Tag：data structure

How is the underlying dynamic array implemented
How is the underlying dynamic array implemented introduction: When it comes to arrays, most of the minds suddenly think of a bunch of things int long short byte float double boolean char String Yes, they can also be defined as arrays However, the above are all static However, what we are learning today is dynamic (ArrayList array) […]

Live streaming reservation Lake Warehouse service, the end of Big data? This open source launch is for you!
【Click to sign up now】August 11th, NetEase Shufan will hold “Enterpriselevel streaming lake warehouse service Arctic Open Source Conference“, invited Netease Shufan’s big data product line and relevant partners to jointly interpret the thinking on the evolution of data technology and Arctic open source, introduce the progress of the Arctic project, future development and community […]

Explore the secrets together, you must know the underlying principle of the doubly linked list
Doubly linked list and data structure introduction in the previous section We analyzed the underlying implementation of ArrayList, Knowing that the bottom layer of ArrayList is implemented based on arrays, it has the characteristics of fast search and modification but slow insertion and deletion The LinkedList we introduced in this chapter is another implementation of […]

HashMap source code line by line analysis, j + oldCap bucket location reallocation formula handwritten verification
illustrate This article is written based on jdk 8. Structure of HashMap The array in the figure is the table property, the basic property of hashMap. An array is used to carry nodes, and each cell of the table is called a bucket. node is the basic node in hashMap, used to store key and […]

Design and Management of Dictionary Service
Coding issues, who doesn’t want to avoid the edge; 1. Business Background In terms of search engine functions, I once encountered such a problem that there is a special code in a company name in the database. Although the data has been normally synchronized to the index, the keywords in the system still cannot match […]

[Algorithm data structure] Understanding records about the backtracking algorithm
Start the second brush backtracking algorithm, here is to think about the backtracking method, and deepen the understanding of its principle and application scenarios. Take the combinatorial problem as an example:Given two integers n and k, return all possible combinations of k numbers in the range [1, n]. Compared with traversal and recursion, this algorithm […]

[Algorithm data structure] Analysis and summary of repeated elements and segmentation problems in backtracking
Here is a summary of the two types of body types that were done yesterday. In the combined sum problem, if you encounter the repeated element situation and the segmentation problem. combined sumhttps://leetcode.cn/problems/…The idea focuses on the current layer, how to choose, corresponding to the code is the backtracking function, how to control the incoming […]

Graphs and their applications
1. The concept of graph (1) Simple graph: no repeated edges and no edges from vertices to itself (data structures are all simple graphs)(2) Degree: the undirected graph is the number of edges attached to the point, and the directed graph is the sum of outdegree and indegree(3) Simple path: a path with no repeating […]

How to choose the collection type correctly in JAVA
Program = data structure + algorithm Program = data structure + algorithm This is a very wellknown formula in the programming world. Most programmers will have heard of this formula when they first started programming. We are also deepening our understanding of this formula in our continuous programming career. Now there are some views that […]

AVL tree
AVL tree properties Its left and right subtrees are both AVL trees The absolute value of the difference between the heights of the left and right subtrees does not exceed 1 (height of the right subtree – height of the left subtree) (also known as the balance factor) Each node has a balance factor Generally, […]

red black tree
Redblack tree concept A redblack tree is a binary search tree that adds a storage bit to each node to store the node color (red or black) By restricting the color, it is ensured that any path from the root node to the leaf node will not be twice as long as other paths (that […]

RedisDetailed Data Structure (Part 2)
In the previous issue, we introduced the three underlying data structures of Redis in detail. Let’s introduce the rest of the data structures to see how they are implemented. compressed list The compressed list is developed by Redis to save memory. It is a sequential data structure composed of a series of specially coded contiguous […]