Tag:Join the team

  • Data structure – queue


    brief introduction Basic concepts The concept of queue is easy to understand. The metaphor of queue is to queue up to buy tickets. Those who arrive first buy first, and those who arrive later can only wait at the end of the queue. Queue is a restricted linear table, which is special in that it […]

  • [STL topic] – 03 relevant examples are selected from ACM


    Dudu xiongxue queue Dudu bear is learning about double ended queues, and he is very interested in their flipping and merging. Initially, there are n empty double ended queues (numbered 1 to n). You need to support Q operations of the degree bear. ① 1 u w Val adds an element with a weight of […]

  • Etcd practice (II)


    The article is constantly updated. Search it on wechatWuqinqiang’s late night canteen 」 In the previous etcd practical Basics (I), we mainly introduced the etcd usage scenarios and some basic operations (put, get, watch). In this article, we will practice other etcd business scenarios. Etcd based distributed lock It is particularly simple to implement a distributed […]

  • Remanufacture in furnace – assembly (container)


    Integral frame Green represents interface / abstract class; Blue represents class. It is mainly composed of two interfaces, one is the “collection” interface, and the other is the “map” interface. preface In the past, when I first started to learn “set”, I didn’t learn the basic knowledge, interfaces and classes well because I didn’t prepare […]

  • Unity implements simple object pooling


    1、 Introduction First, let’s talk about why we use the object poolWhen unity games are running, it is often necessary to generate some objects, such as bullets, enemies, etc. Although unity hasInstantiate()Method can be used, but it is not efficient in some cases. Especially for those objects that need a large number of generation and […]

  • [selected sword fingers] from a macro point of view, “symmetric binary tree”


    Title Description This is from niuke.com“JZ 58 symmetric binary tree”, difficulty is“Difficulties”。 Tag: “sword finger offer”, “binary tree”, “sequence traversal”, “iteration”, “recursion” Description: Please implement a function to judge whether a binary tree is symmetric. Note that if a binary tree is the same as the image of the binary tree, it is defined as […]

  • Review: data structure and algorithm – 07 queue


    xwzz.jpg Review: data structures and algorithms – Opening Review: data structure and algorithm – complexity analysis (I) Review: data structure and algorithm – complexity analysis (II) Review: data structures and algorithms – arrays Review: data structure and algorithm – linked list (I) Review: data structure and algorithm – linked list (2) Review: data structures and […]

  • Read JDK source code: delivery queue linkedtransferqueue


    Linkedtransferqueue is an unbounded blocked transferqueue queue composed of linked list structure.The interface transferqueue and the implementation class linkedtransferqueue have been added to j.u.c since Java 7. Linkedtransferqueue is as applicable to Transitivity scenarios as synchronous queue The more efficient implementation of transferer can be compared with reading mySynchronousqueue source code reading notes Linkedtransferqueue, like […]

  • [PHP data structure] relevant logical operations of queue


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

  • Redis learning notes – (5) – list (stack / queue / blocking queue)


    Previous: redis learning notes – (4) – set List related commands: lpush/rpush/lpop/rpop/brpop/blpop 5.1 stack = lpush + lpop (in and out of the same end) lpush+lpop> lpush juc synchronized volatile aqs thread (integer) 4 > lpop JUC # last in, first out “thread” > lpop JUC # penultimate “aqs” > lpop […]

  • Algorithm notes – breadth first search


    The essence of depth first search isrecursion, breadth first searchNo recursion is required Depth first searchDo not use stack implementation, breadth first searchTo implement with queues Scanf() by s format characterNoEnter a string with spaces gets()canEnter a string with spaces Scanf() takes carriage return as the terminator of the string, andDon’t read awayCarriage return, which […]

  • Redis transaction details


    The article is included in GitHub javakeeper, the weapon spectrum of necessary skills for n-line Internet development Suppose there is such a business that some data obtained by users comes from third-party interface information. In order to avoid frequent requests for third-party interfaces, we often add a layer of cache. The cache must be time-effective. […]