There are 10 data structures: array, linked list, stack, queue, hash table, binary tree, heap, jump table, graph, Trie tree; 10 algorithms: recursion, sorting, binary search, search,
hash algorithm, greedy algorithm , divide and conquer algorithm, backtracking algorithm, dynamic programming, string matching algorithm.
Article directory
Vue source code related practice questions
- Sword Finger Offer II 082. Combinations with sets of repeated elements - LeetCode
- Jianzhi Offer II 016. The longest substring without repeated characters - LeetCode
- Jianzhi Offer 48. The longest substring without repeated characters - LeetCode
- Jianzhi Offer II 019. Delete at most one character to get a palindrome - LeetCode
- 1446. Consecutive Characters - LeetCode
- Sword Finger Offer II 119. The longest continuous sequence - LeetCode
5.5 Remove duplicate elements from an ordered array
- 26. Remove Duplicates in Sorted Array - LeetCode
- 83. Delete duplicate elements in sorted list - LeetCode
1. Basic algorithm idea
1-1 Backtracking/recursion
2023/1/31
-
- 1. 47. Full Arrangement II【My brain is whistling, I can't do it!】
2023/1/31
- 78. Subset
- Sword Pointer Offer II 079. All Subsets
- 77. Combination
- 78. Subset
- 90. Subset II
- 46. Full Arrangement
- 416. Splitting Equal Sum Subsets
1-2 Dynamic programming dp
2023/1/31
- Sword Finger Offer 10- I. Fibonacci Sequence
- 300. Longest Increasing Subsequence
- 674. Longest Continuous Increasing Sequence
2023/2/1
- 322. Exchange of change
- 354. Matryoshka envelope problem
- 3. The number of the longest increasing subsequence [almost a little bit, the west road is very clear]
- 53. The largest subarray sum [two or three lines changed]
- 1143. Longest Common Subsequence
- 516. Longest Palindromic Subsequence
- 72. Edit Distance
- 1312. Minimum Number of Insertions to Make a String a Palindrome
- 474. Ones and Zeros
- 494. Objectives and
- [ ]
1-3
2. Sorting
2-1 O(n 2 )
2-1-1 Bubble sort
2-1-2 Insertion sort
2-1-3 Selection sort
2-1-4 Hill sort
2-2 O(nlogn)
2-2-1 Merge sort
2-2-2 Quick Sort
2-2-3 Heap sort
2-3 O(n)
2-3-1 Counting sort
2-3-2 Radix sorting
2-3-3 bucket sort
Three, tree
3-1 Binary tree
1/25
- The sword refers to Offer 55 - I. The depth of the binary tree
- 111. Minimum depth of binary tree
- 124. The maximum path sum in a binary tree【Changed a line of code】
- 100. The same tree
- 105. Construct Binary Tree from Preorder and Inorder Traversal Sequences
if(preLeft > preRight || inLeft > inRight) return null;
- 106. Construct Binary Tree from Inorder and Postorder Traversal Sequences
2023/2/1
3-1-1 Balanced binary tree
3-1-2 Binary search tree
1/25
- 653. Sum of Two Numbers IV - Input Binary Search Tree【Changed a line of bug】
- 700. Searching in a Binary Search Tree
- 701. Insertion in a Binary Search Tree
- 98. Verify binary search tree [some test cases fail]
-
var isValidBST = function(root) { const realValidBST = (root, min,max) => { if(root === null) return true; if(min !== null && min.val >= root.val) return false; if(max !== null && max.val <= root.val) return false; return realValidBST(root.left, min, root) && realValidBST(root.right, root, max) } return realValidBST(root, null, null) }; // var isValidBST = function(root) { // if(root === null) return true; // if(root.left && root.left.val >= root.val) return false; // if(root.right && root.right.val <= root.val) return false; // return isValidBST(root.left) && isValidBST(root.right) // };
- 99. Restoring a Binary Search Tree
- 450. Delete the node in the binary search tree [can be written, half of the test cases pass, need to change three places]
- Sword refers to Offer 68 - II. The nearest common ancestor of the binary tree
3-1-3 Balanced Binary Search Tree
3-1-4 complete binary tree
1/26
3-1-5 full binary tree
3-2 Multi-way search tree
3-3 piles
3-3-1 small top pile
3-3-2 big top pile
3-3-3 Fibonacci Heap
3-3-4 binomial heap
3-3-5 Priority queue
4. Figure
4-1 Storage of graphs
4-1-1 Critical Matrix
4-1-2 Adjacency list
4-2 Topological sort
4-3 Shortest path
4-4- Critical path
4-5 Minimum spanning tree
4-6 Bipartite graph
4-7 Maximum flow
5. Search
5-1 Depth-first search
5-2 Breadth-first search
6. Search
6-1 Linear table lookup
6-2 Tree Structure Search
6-3 散列表查找
七、 散列表
7-1 散列函数
7-2 冲突解决
7-2-1 链表法
7-2-2 开放寻址法
7-2-3 其他
7-3 动态扩容
7-4 位图
八、 线性表
8-1 数组
1/28
8-2 链表
8-2-1 单链表
1/28
- 剑指 Offer II 025. 链表中的两数相加 【一直在出小问题】
- 2. 两数相加
- 234. 回文链表
- 剑指 Offer II 018. 有效的回文
- 92. 反转链表 II 【有改不了的bug】
8-2-2 双向链表
8-2-3 循环链表
8-2-4 双向循环链表
8-2-5 静态链表
8-3 栈
8-3-1 顺序栈
- 739. 每日温度【一行bug】
- 503. 下一个更大元素 II【一行bug】
- 496. 下一个更大元素 I