[data structure and algorithm] in-depth analysis of the solution idea and algorithm example of the competition round of the best athletes
1, Title Description
N athletes participate in a championship. All athletes stand in a row and number from 1 to n according to the first position (athlete 1 is the first athlete in this row, athlete 2 is the second athlete, and so on).The championship consists of multiple rounds (starting from round 1). In each round, the ith athlete from the ...
Added by ozzthegod on Sun, 26 Dec 2021 15:51:29 +0200
LeetCode_Stack_331. Verify Preorder Serialization of a Binary Tree (Java) [stack, string processing]
catalogue
1, Title Description
English description
Chinese description
Examples and descriptions
2, Problem solving ideas
1. Stack merge node
2. Calculate the input and output
3, AC code
Java
Stack
Calculate access
ย
4, Problem solving process
First Bo
Second stroke
ย
1, Title Description
English description
One way to se ...
Added by inkel on Sun, 26 Dec 2021 15:13:38 +0200
leetcode gives 1609 questions a day. Parity Tree Christmas You made even and odd numbers No BFS sets of templates once
leetcode gives 1609 questions a day. Parity Tree Christmas You've made even and odd numbers without BFS sets of templates once ~
Write before
Christmas Eve, very calm, but the small payment is too boring, but it is not sleepy, fortunately to brush the topic, this Saturday is a good day to rest, but since everyone is not sleeping ~then I am al ...
Added by tycoon79 on Sun, 26 Dec 2021 03:32:50 +0200
Data structure - stack
preface
This paper is based on C language. The following is the main content of this article, and the following cases can be used for reference
1, Concept and structure of stack
Stack: a special linear table that allows insertion and deletion of elements only at a fixed end. One end for data insertion and deletion is called the to ...
Added by jamal dakak on Sat, 25 Dec 2021 23:17:00 +0200
(dynamic programming) 1547. Minimum cost of cutting a stick (interval dp) / 221. Maximum square / 1312. Minimum number of inserts to make a string a palindrome string (interval dp)
1547. Minimum cost of cutting stick
Title Description
There is a wooden stick with a length of N units, on which several positions are marked from 0 to n. For example, a stick with a length of 6 can be marked as follows:
Give you an integer array cuts, where cuts[i] indicates where you need to cut the stick.
You can finish the cutting in ...
Added by wpfn on Sat, 25 Dec 2021 18:34:40 +0200
[one day's double questions - see what you know] today's simple / medium question - Roman numeral + integer to Roman numeral
1, Simple question 13 Roman numeral to integer
1.1 Title Description
Roman numerals contain the following seven characters: I, V, X, L, C, D and M.
character numerical value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, the Roman ...
Added by mikefrederick on Sat, 25 Dec 2021 11:21:36 +0200
Linked list printing (linked list inversion output)
1. Title Description: Enter the head node of a linked list and print the value of each node from tail to head. The linked list is defined as follows:
struct ListNode
{
int m_nKey;
ListNode* m_pNext;
}
2. Test case
Function test (the input linked list has multiple nodes; the input linked list has only one node)Special input test (the input ...
Added by phillfox on Fri, 24 Dec 2021 12:24:58 +0200
Championship winner LeetCode Plus member exclusive question [detailed analysis] MySQL
Hello, I'm Lao Wu. You can also call me classmate Wu. Younger friends can also call me senior brother Wu. Welcome to the world of data analysis with me and learn together!
Interested friends can pay attention to me Data analysis column , there are many high-quality articles to share with you. In addition, you are also welcome to pay attention ...
Added by danjar on Thu, 23 Dec 2021 00:02:58 +0200
[LeetCode] DFS template second kill question
1. DFS basic framework
DFS in Figure
The core issue is "Traversing a two-dimensional array"
The two-dimensional array traversal framework is as follows:
void dfs (int[][] grid , int i , int j , boolean[] visited) {
int m = gird.length , n = grid[0].length;
//Check for out of bounds
if (i < 0 || j < 0 || i >= m || j & ...
Added by dimkasmir on Wed, 22 Dec 2021 10:30:40 +0200
โญ Introduction to algorithm โญ Queue monotone queue difficulty 02 - leetcode 1425 Restricted subsequence sum
๐ If you don't eat or drink, you must brush the questions ๐
C language free animation tutorial, punch in with me!
๐ Daylight science C language ๐
LeetCode is too hard? Look at the simple questions first!
๐งก 100 cases of introduction to C language ๐งก
Difficult data structure? It doesn't exis ...
Added by cyprus on Wed, 22 Dec 2021 04:02:21 +0200