This HandBook it currently developed by gitHub page.
字符串解析 ConvertToTree 可取消的 promise
83. Remove Duplicates from Sorted List
19. Remove Nth Node From End of List
160. Intersection of Two Linked Lists
1160. Find Words That Can Be Formed by Characters
1189. Maximum Number of Balloons
1207. Unique Number of Occurrences
A binary tree is a simple directed graph where each node has a left node and a right node.
The main traversal methods of binary trees are BFS and DFS.
104. Maximum Depth of Binary Tree
111. Minimum Depth of Binary Tree
222. Count Complete Tree Nodes
513. Find Bottom Left Tree Value
235. Lowest Common Ancestor of a Binary Search Tree
108. Convert Sorted Array to Binary Search Tree
这个模块是一个小进阶的模块,涉及到了很多的递归,由于递归的思想和我们大脑的思考方法是相反的,但是回溯并不是一个很高效的算法,只适合解决一些数据规模比较小的场景。
491. Non-decreasing Subsequences
698. Partition to K Equal Sum Subsets
这个算法的核心就是在递归的基础上记录已经算过的状态,如果下次运算过相同的状态,直接返回已经算过的状态,避免重复运算。
优点:掌握了暴力搜索,比如回溯和递归的写法之后,入门会非常的简单,时间复杂度与常规的(自底向上)动态规划是一致的。
缺点:由于依然是使用递归,所以当数据规模大的时候会有比较大的栈消耗
总结:如果笔试的时候想不出自底向上的动态规划,那么直接使用记忆搜索就可以了
When you are stuck, try to think for 7~10 minutes. If you still could not figure it out or have any ideas, you should see the answers.
Data structures can sometimes be difficult to grasp because it's hard to think through them using only your brain. Try drawing graphs and breaking down the steps.
Most questions should have various answers. Try to explore multiple solutions if you can. Sometimes, other answers will give you more insight. Remember, it's not about how many questions you've done; it's about whether you're familiar with the algorithms behind them.
Whether they fully understand it or not, discussing code with others can enhance your grasp of programming languages.