LeetCode best time to buy and sell stocks series summary
LeetCode best time to buy and sell stocks series summary
This kind of dynamic programming is optimized from two-dimensional dynamic gauge to one-dimensional dynamic gauge. Greed can also be used in some problems.
catalog:
121 the best time to buy and sell stocks 1 122 the best time to buy and sell stocks 2 123the best time to buy and sell st ...
Added by interactive on Tue, 21 Dec 2021 18:41:28 +0200
[data structure] Trie tree (dictionary tree)
1 Basic Concepts
Trie tree (dictionary tree), also known as word lookup tree, is a data structure that can efficiently store and find string sets (not limited to strings). In y's eyes, it is a very simple data structure. It includes the following three properties:
The root node does not contain characters. Except for the root node, each node ...
Added by robembra on Tue, 21 Dec 2021 13:43:52 +0200
Time complexity VS space complexity, can't you calculate it yet?
The ultimate purpose of studying algorithms is how to spend less time and occupy less memory to complete the same requirements. Cases also demonstrate the differences in time and space consumption between different algorithms, but we can't use time and space. Therefore, Next, we will learn about the description and analysis of algorithm time co ...
Added by czambran on Tue, 21 Dec 2021 09:17:42 +0200
Insert sort - linked list sorting algorithm for array and array storage structure
Insert sort idea
When sorting, each element to be sorted is compared with the previous sorted element. If the reverse order occurs, you need to find a suitable position in the sorted element sequence that can keep it in order, find the insertion position, move the sorted sequence back to make space, and then insert the elements to be sorted;
...
Added by olechka on Tue, 21 Dec 2021 07:46:00 +0200
LeetCode brush notes binary search local order
Local ordering of binary search
We already know that binary search is a search algorithm for finding a specific element in an ordered array.
What if an array is not globally ordered, but locally ordered? At this time, we can use the divide and conquer strategy. We can perform binary search in the locally ordered interval, and then combine eac ...
Added by Rayman3.tk on Tue, 21 Dec 2021 07:36:47 +0200
Data structure C language version (Yan Weimin) - linear table
1, Definition and characteristics of linear table
1. Definitions
A finite sequence consisting of n elements with the same data characteristics is called a linear table N is the length of the linear table. When n=0, it is an empty table
2. Features
(non empty linear table or linear structure)
Unique "first" data elementUnique ...
Added by lhale on Tue, 21 Dec 2021 07:17:38 +0200
Data structure experiment 4 implementation of basic operations of stack and queue
Experimental purpose
Master the abstract data types of stack and queue, and be able to correctly select them in corresponding application problems, Master the implementation methods of stack and queue (sequential and chained), the implementation algorithms of two storage structures and basic operations, pay attention to the judgment condition ...
Added by homer09001 on Mon, 20 Dec 2021 22:44:07 +0200
Common sorting algorithms and their implementation
Time complexity and implementation of common sorting algorithms
Criteria for judging the advantages and disadvantages of sorting algorithm
Time complexity
The time complexity reflects the number of times a sorting algorithm executes in the sorting process, so the time complexity can be used to estimate the time speed of a sorting algorit ...
Added by saku on Mon, 20 Dec 2021 22:24:00 +0200
Data structure (shortest path)
I haven't systematically studied JAVA yet, so this note studies the shortest path problem of graph in data structure C language version.
route
Considering the weighted digraph, the sum of the weights of the edges on a road force (only considering a simple path) is defined as the path length or weighted path length of the path
There may b ...
Added by christo on Mon, 20 Dec 2021 18:59:29 +0200
Java interview Dictionary (2020 Edition), Tencent Java school recruitment interview
24. Tell me about the implementation principle of HashSet?
The bottom layer of HashSet is implemented by HashMap The value of HashSet is stored on the key of HashMap The value of HashMap is unified as PRESENT
25. What is the difference between ArrayList and LinkedList?
The most obvious difference is that the underlying data structure of ...
Added by orbitalnets on Mon, 20 Dec 2021 15:56:16 +0200