-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leetcode 解题套路 #3
Labels
Comments
数组 Array 双指针 Two Pointers[0, i), [i, j), [j, len(array)) 同向
反向
参考自:图灵星球 |
HashMap 哈希表在平均 O(1) 时间内快速增删查, 用于加速查找 |
Stack 栈单调栈每次新元素入栈后,栈内的元素都保持有序(单调递增或单调递减)。 Next Greater Element循环数组 |
DP Search搜索空间可以用 Tree 的形式展现出来,便于理解。时间复杂度取决于这棵树的深度和每个 node 的 children 个数。 Search 最重要的是:定义好状态,保证每个子问题都能用一个状态来描述 Top Down DFS 模板
dfs(state):
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
No description provided.
The text was updated successfully, but these errors were encountered: