Implementation of binary search tree
What is a binary search tree? What are the characteristics of binary search tree? How to implement binary search tree?
1: Binary search tree is also called binary search tree and binary sort tree. As the name suggests, the search efficiency of binary search tree is very high, and binary search tree should meet the structural characteristics of ...
Posted by phifgo on Wed, 22 Sep 2021 20:54:12 -0700
HashMap related summary
This article is reproduced from: Implementation of HashMap in Jdk1.7 and 1.8 Essential for interview: Principles and differences of HashMap, Hashtable and ConcurrentHashMap
1, A glimpse of HashMap
HashMap is a more widely used hash table implementation, and in most cases, it can carry out put and get operations under the condition of consta ...
Posted by brucensal on Wed, 22 Sep 2021 19:00:12 -0700
Detailed explanation of user-defined type: structure (memory alignment, bit segment) + enumeration + Union
Data type:
C language built-in type: — char short int long float double Custom type / construction type: - structure, enumeration, union
Data storage - type details
1, Structure
1. Special declaration
When declaring a structure, you can declare it incompletely
Anonymous structure
struct
{
int a;
char c;
double d;
}s1, s2; ...
Posted by pgudge on Wed, 22 Sep 2021 09:53:31 -0700
Data structure, algorithm and application - C + + language description learning notes - priority queue - Application - Hoffman coding
1, Principle and construction process
1. Principle
Previously, we learned the text compressor based on LZW algorithm, which is based on the repetition of substrings in the text. Huffman coding is another text compression algorithm, which is based on the relative frequency of different symbols in a text. Suppose a text is a string composed ...
Posted by bokehman on Wed, 22 Sep 2021 07:02:04 -0700
(POJ-2528) Mayor's posters (interval coverage + discretization)
Title Link: https://vjudge.net/problem/POJ-2528
This question asks how many posters we can see in the end. If we are thinking about it, it will be more troublesome, because we are not sure whether the current poster will be covered by the later poster, but we can be sure that the later poster will not be covered by his previous poster, so we c ...
Posted by einamiga on Wed, 22 Sep 2021 05:06:37 -0700
Introduction to linked list (C + +)
Learn the basic knowledge of linked list on LeetCode and summarize as follows:
1. Introduction to single linked list
Unlike an array, a single linked list only stores the value of the element. In addition to the value of the data, a single linked list also includes a reference field pointing to the next node, which ...
Posted by Talon on Tue, 21 Sep 2021 23:41:50 -0700
Data structure C language implementation sequence table -- detailed explanation of addition, deletion, query and modification operation
Sequence table
What is the sequence table?
Sequence table is to store elements in a continuous storage area in sequence, and the sequence relationship between elements is naturally represented by their storage order. Realize the function of adding, deleting, checking and modifying.
Header file required for sequence table:
#include<st ...
Posted by iRock on Tue, 21 Sep 2021 14:46:02 -0700
Chapter II Data Structure Monotonic Stack and Monotonic Queue
1. Algorithmic ideas
The core idea of these two algorithms is: Only those elements that conform to a certain monotonicity are likely to be the answer. Screen out those elements that do not conform to a monotonicity according to the title requirements, store those elements that conform to a certain monotonicity in the stack or queue, and obtain ...
Posted by Trey395 on Tue, 21 Sep 2021 09:40:12 -0700
Dictionary tree implementation of high-performance shielded word algorithm (principle and Implementation)
Some time ago, I saw the violent traversal method used by the company's games to realize the shielding word algorithm of the game. Later, I found that the efficiency of this algorithm is relatively low. Therefore, I learned about the trie tree on the Internet, so now I use the trie tree to realize a shielding word algorithm.
Construction pri ...
Posted by vikela on Tue, 21 Sep 2021 04:08:02 -0700
Showdown front-end algorithm - Search Search Algorithm - binary search
Index of this series
Linear table basis
Linked listqueueStack Tree structure foundation
Binary treeHeap and priority queueJoint search set Sorting algorithm
Quick sortMerge sortCardinality / topological sorting Search Search Algorithm
Binary search To be continued
Binary search principle
Binary search is an algorithm applied to ...
Posted by simenss on Tue, 21 Sep 2021 02:40:42 -0700