Tag:Team leader

  • Algorithm leetcode several double pointer problems


    1. Search insertion location https://leetcode-cn.com/problems/search-insert-position/ class Solution { public int searchInsert(int[] nums, int target) { int left=0,right=nums.length-1; while(left<=right){ int mid=(left+right)/2; if(nums[mid]target){ right=mid-1; }else{ return mid; } } return left; } } 2. Search two-dimensional matrix https://leetcode-cn.com/problems/search-a-2d-matrix/ public boolean searchMatrix(int[][] matrix, int target) { if(matrix.length == 0) return false; int row = 0, col = matrix[0].length-1; […]

  • HTTP has reached 3.0. Don’t you know 1 and 2?


    It takes about 5 minutes to read this article in its entirety. summary The HTTP protocol has four stages. The more important stages are0.9/1/2/3, of which 1 is divided into1.0and1.1。 What is stipulated in the agreement 1、 Http / 0.9 serves simple HTML file transfer Http / 0.9 can only be used toTransfer small HTML […]

  • Go data structure ice breaking road – (III) circular queue


    queue definition //A linear table whose structure is open at both ends //The end that is allowed to be deleted is called the head of the team //The end that allows insertion is called the end of the queue //Write out the construction structure of the queue according to the definition (assuming that there are […]

  • This article explains in detail the “queue” and three methods of hand rolling the queue!


    This article has been included in my GitHub algorithm diagram series:https://github.com/vipstone/algorithm Earlier we introducedStack, queue and stack are similar data structures. We can imagine that many cars are passing through the tunnel of one-way street. All vehicles can’t jump in line or turn around, and the first cars come out first. We can call this […]

  • Simple explanation of monotone queue


    concept 1. Monotone queue is a kind of queuecrapHowever, it is different from ordinary queues. It supports two head operations, that is, it can be operated at the end of the team or at the head of the team. For example, it can pop up, and it can be bullet head or bullet tail 2. […]

  • Array simulation (I)


    Write in front The focus of recent study should be on graph theory. The data structures that I have been learning in acwing are array simulation. The efficiency of array simulation is several times faster than that of STL. I will forget it soon after learning, but forgetting is also a kind of learning. It […]

  • queue


    queue Basic concepts Logical structure definition queue(queue): only in the tableone endInsert and delete at the other endLinear table。 Team leader(front): the end of a linear table that allows deletion. Team tail(rear): the end that allows insertion. Empty queue: an empty table without any elements. characteristic First in first out(First In First Out,FIFO) basic operation […]

  • The evolution of quic protocol


    When transmitting data over the network, a new protocol quic (quick UDP Internet connection) is becoming the default choice of faang. This article describes how quic protocol overcomes the limitations of other versions of HTTP. Faang is the acronym of the five most popular and best performing technology stocks in the U.S. market, namely Facebook, […]

  • Interviewer: why merge HTTP requests?


    Source:https://www.jianshu.com/p/9a3f0e84c2b0 Thinking path: Why do you want to implement batch call? – > Reduce transmission loss in the network – > how to reduce? – > How to reduce network loss by merging HTTP requests – > merging HTTP requests? This paper will solve this problem. Let’s look at the impact of a single request […]

  • [PHP data structure] logical operations related to queues


    In the logical structure, we have learned a very classic structure type: stack. Today, let’s learn another classic logical structure type: queue. I believe many students have used cache queue tools such as redis and rabbitmq. In fact, database and program code can realize the operation of queue. Just like stack, queue also has its […]

  • [detailed illustration] learning queue, just read this one!


    Key points: This paper mainly introduces the structure, basic principle and operation of queue, involving two implementations: sequential queue and chain queue. 1. What is a queue? Let’s take a daily example and queue up to buy food. Everyone lined up in front of the window to buy food in the order of first come, […]

  • Implementing queues in JavaScript


    As an excellent programmer, you need to have a wide range of knowledge. The first is to understand the programming language you choose. If you are reading this article, you are most likely to use JavaScript. However, after you are familiar with the programming language, you must also understand how to manipulate data easily and […]