Priority Queue Implementation Principle Analysis

Introduction Priority queue is a widely used data structure in practical projects. Whether it is in the process scheduling of the operating system or in related graph algorithms such as Prim algorithm and Dijkstra algorithm, we can see the appearance of priority queue. In this paper, we will analyze the implementation principle of priority queu ...

Posted by owner on Sat, 13 Jul 2019 18:20:36 +0200

C# Task source code reading (1)

Usually, we often use Task in our development. Many of the later. net versions are related to Task. For example, asyn,await has Task. We seldom pay attention to Thread. Task has brought us a lot of convenience. We pay less attention to the process of execution and more attention to logic. But sometimes, there are applications. And we have to co ...

Posted by james_cwy on Sat, 13 Jul 2019 03:16:50 +0200

Common JavaScript String Operations

JavaScript strings are used to store and process text. So when you write JS code, she always goes hand in hand, when you process user's input data, when you read or set the attributes of DOM objects, when you operate Cookie, when you convert different Date s, and so on, countless; and her many API s, there are always some impulses that people d ...

Posted by music_man on Sat, 13 Jul 2019 01:31:07 +0200

Introduction to Algorithms--Summary of Binary Search Tree Implemented by java Language

The pictures are all from Mucho. com, just for learning records. 1. Binary Search Tree It can also be called a binary search tree. It can not only find data, but also insert and delete data efficiently. Features: The key value of each node is larger than that of the left sub-node and smaller than that of the right sub-node. Note that it ...

Posted by arkleyjoe on Fri, 12 Jul 2019 02:11:10 +0200

Introduction of Lock and ReentrantLock in JUC and Source Code Analysis

Links to the original text Lock framework is a new addition to jdk1.5. It works as synchronized, so it can be compared with synchronized when learning. In this paper, we first make a simple comparison with synchronized, and then analyze the Lock interface and the source code and description of ReentrantLock. Specific analysis of other Lock impl ...

Posted by wshell on Fri, 12 Jul 2019 00:13:45 +0200

vue2 source learning appetizer-snabbdom source learning (1)

Preface Recently, in learning the source code of vue2.0, I just started to look at the source code of vdom, but I really can't find the direction, because it is added to the implementation of vdom.Many hooks of vue2.0 itself make reading more difficult. So I saw the first line saying that vdom of vue2.0 is snabbdom.On the basis of that, snabbdo ...

Posted by wilburforce on Thu, 11 Jul 2019 03:10:55 +0200

One Linux command per day (32): ln

The function of ln is to create a synchronous link for a file in another location. When using the same file in different directories, we don't need to put the same file in each directory. We just need to put the file in a fixed directory, and then link it with ln command in other directories. We don't need to occupy disk space repeatedly. 1. ...

Posted by flaab on Thu, 11 Jul 2019 00:51:47 +0200

One Linux command per day (33): diff

Diff is used to find out the different contents of a file. In particular, diff prints out changes to each line on the command line for two different versions of the same name file, and its latest version also supports comparing binary files. The patch program in Linux system can update the file content of a.c to b.c according to the output of ...

Posted by Komodo on Wed, 10 Jul 2019 19:42:14 +0200

"BZOJ1669" D Hungry Cattle [Usaco2006 Oct] Hungry Cows Bull Holiday Team Competition 5 (LIS, discrete tree array)

Links: https://ac.nowcoder.com/acm/contest/984/D Source: Niuke.com Hungry cattle Time limit: C/C++ 1 second, 2 seconds for other languages Space limitations: C/C++ 32768K, other languages 65536K 64bit IO Format: %lld Title Description Farmer John has N (1 <= N <= 5,000) cows, each with a positive integer number of no more than 32 binary d ...

Posted by aniket_dj on Wed, 10 Jul 2019 19:22:54 +0200

[Programming Question] Jingdong 2016 - Buy Candy

Code writing is a bit cumbersome, welcome to correct~ Topic Source: Cyber Code Network Buy candy (Beijing East 2016 intern real topic) Topic Description A candy company specializes in the production of children's candies. The most popular candies for children are A1 and A2, which are packaged in box. The volume of packaged A1 candy is one ...

Posted by vijdev on Wed, 10 Jul 2019 01:08:15 +0200