Tag:Join the team

  • [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, […]

  • How to implement queue data structure in JavaScript


    To be an excellent developer, you need knowledge from multiple disciplines. However, on the basis of understanding the programming language, you must also know how to organize the data so that you can easily and effectively manipulate the data according to the task. This is what data structures do. In this article, I will describe […]

  • [data structure and algorithm: simple method] talk about the implementation of priority queue


    [recommended reading of series articles] [sequence table of data structure] use diagrams and codes to make you understand the linear table of sequence structure [linked list of data structure] after reading this article, I finally understand the linked list [stack of data structure] understand the “stack” with detailed graphics and text (principle chapter) [queue of […]

  • Kafka0.8 producer exception handling


    order This article briefly analyzes the exception handling of Java producer in Kafka version survey Kafka’s Java producer is sent asynchronously, mainly in several steps: Append to recordaccumulator The sender takes out the recordbatch from the recordaccumulator and sends it to the client Networkclient deals with broker and sends recordbatch This involves exceptions in […]

  • Restricted linear list queue (sequential storage and chained storage)


    1. Queue overview 1.1 queue definition A queue is a linear table that only allows insertion at one end and deletion at the other.A queue is a first in first out linear tableThe end that can be inserted is called the end of the team, and the end that can be deleted is called the […]

  • Leetcode 101. Symmetric binary tree | Python


    101. Symmetric binary tree subject Given a binary tree, check whether it is mirror symmetric. For example, a binary tree [1,2,2,3,4,4,3] is symmetric. 1 / \ 2 2 / \ / \ 3 4 4 3 But the following [1,2,2, null, 3, null, 3] is not mirror symmetric: 1 / \ 2 2 \ \ […]

  • Source code analysis of abstractqueuedsynchronizer


    summary Abstract queued synchronizer (AQS) provides an abstract implementation of synchronizer framework. Concurrency classes such as reentrantlock, semaphore, countdownlatch and cyclicbarrier are all implemented based on AQS. The specific usage is to inherit AQS to implement its template method, and then take subclasses as internal classes of synchronization components. Source code analysis Member variable Head […]

  • Redis learning notes (21) business


    At the beginning of the article, there are 21 articles about the trivial knowledge of redis. There is not too much about the application of redis in the programming process. It focuses on the implementation principles of master-slave, sentry and cluster used in the construction of redis command, client, server and production environment. If you […]

  • Redis implementation of distributed lock and task queue


    1、 Text As we all know, there are many second killing activities on e-commerce websites such as tmall, Jingdong, Suning, etc. for example, when you rush to buy a mobile phone with the original price of 1999, now the second killing price is only 999, there will be a peak period of user requests, and […]

  • Source code analysis of spool — queue queue of basic module


    preface swooleThere are two kinds of underlying queues: interprocess communicationIPCMessage queue forswMsgQueue, and ring queueswRingQueue。IPCMessage queuing fortask_workerThe process accepts delivery messages, and the ring queue is used toSW_MODE_THREADIn thread modetask_workerA method of accepting and delivering messages. swMsgQueueMessage queue data structure swooleThe message queue used is notPOSIXNextmq_xxSystem function, butSystemVNextmsgxxxSeries of functions, the reason is guesssystemvSystem functions […]

  • Transactions in redis


    Redis transaction introduction Friends who know a little about redis know that redis also provides transaction functions. However, transactions in redis are different from those in relational databases that we are familiar with. The essence of redis transaction is a set of commands: all commands in a transaction will be serialized into a queue. During […]

  • Dp-01 matrix of algorithm


    01 matrix difficultysecondary Given a matrix of 0 and 1, find the distance from each element to the nearest 0.The distance between two adjacent elements is 1. Example 1:Input:0 0 00 1 01 1 1Output:0 0 00 1 01 2 1 1. To solve this problem, let’s start with a questionNumber of islands The problem […]