Skip to content

Instantly share code, notes, and snippets.

@yanring
Last active March 10, 2024 01:43
Show Gist options
  • Save yanring/fd7c494616f99052d1fea3bc788cc800 to your computer and use it in GitHub Desktop.
Save yanring/fd7c494616f99052d1fea3bc788cc800 to your computer and use it in GitHub Desktop.
  1. 重建二叉树 -> https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
  2. √矩阵中的路径 -> https://leetcode.com/problems/word-search/
  3. 机器人的运动范围 -> 没找到
  4. 剪绳子(dp) -> 没找到
  5. √二进制中1的个数 -> https://leetcode.com/problems/number-of-1-bits/ ->(升级版)https://leetcode.com/problems/counting-bits/
  6. √数值的整数次方(溢出) -> https://leetcode.com/problems/powx-n/
  7. 打印从1到最大的n位数(溢出) -> 没找到
  8. √删除链表的节点 ->(简单版)https://leetcode.com/problems/delete-node-in-a-linked-list/ ->(升级版)https://leetcode.com/problems/remove-linked-list-elements
  9. ×正则表达式匹配 -> https://leetcode.com/problems/regular-expression-matching/
  10. ×表示数值的字符串 -> https://leetcode.com/problems/valid-number/
  11. √调整数组顺序使奇数在偶数前 -> https://leetcode.com/problems/sort-array-by-parity
  12. √链表中倒数第K个节点 -> https://leetcode.com/problems/remove-nth-node-from-end-of-list/
  13. √链表中环的入口节点 -> https://leetcode.com/problems/linked-list-cycle-ii
  14. √反转链表 -> 只用了递归,下次用循环 https://leetcode.com/problems/reverse-linked-list/
  15. √合并两个排序的链表 -> https://leetcode.com/problems/merge-two-sorted-lists/
  16. √树的子结构 -> * https://leetcode.com/problems/subtree-of-another-tree/
  17. √二叉树的镜像 -> https://leetcode.com/problems/invert-binary-tree
  18. √对称的二叉树 -> https://leetcode.com/problems/symmetric-tree/
  19. √顺时针打印矩阵 -> https://leetcode.com/problems/spiral-matrix/
  20. √包含min函数的栈 -> https://leetcode.com/problems/min-stack/
  21. √栈的压入、弹出序列 ->* https://leetcode.com/problems/validate-stack-sequences/
  22. √从上到下打印二叉树 -> https://leetcode.com/problems/binary-tree-level-order-traversal/ -> 从下到上 https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ -> 之字形打印 https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
  23. 二叉搜索树的后序遍历序列 -> *(只有先序遍历)https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree/
  24. √二叉树中和为某一值得路径 -> https://leetcode.com/problems/path-sum/
  25. √复杂链表的复制 -> https://leetcode.com/problems/copy-list-with-random-pointer/
  26. √二叉搜索树与双向链表 -> *(收费)https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/ -> (牛客网)https://www.nowcoder.com/practice/947f6eb80d944a84850b0538bf0ec3a5?tpId=13&tqId=11179&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking
  27. √序列化二叉树 -> https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
  28. √字符串的排列 -> (原理相同,leetcode用的数组)https://leetcode.com/problems/permutations/ ->(有重复元素的情况) https://leetcode.com/problems/permutations-ii
  29. √数组中出现次数超过一半的数字 -> https://leetcode.com/problems/majority-element/ -> (升级版) https://leetcode.com/problems/majority-element-ii/
  30. √最小的k个数 -> *(类似)https://leetcode.com/problems/kth-largest-element-in-an-array/
  31. √数据流中的中位数 -> * https://leetcode.com/problems/find-median-from-data-stream/
  32. √连续子数组的最大和 -> https://leetcode.com/problems/maximum-subarray/
  33. √1~n整数中1出现的次数 -> https://leetcode.com/problems/number-of-digit-one/submissions/
  34. √数字序列中某一位的数字 -> https://leetcode.com/problems/nth-digit/
  35. √把数组排成最小的数 -> https://leetcode.com/problems/largest-number/
  36. √把数字翻译成字符串 -> (递归or动归) https://leetcode.com/problems/decode-ways/
  37. 礼物最大值 -> 未找到
  38. √最长不含重复字符的子字符串 -> https://leetcode.com/problems/longest-substring-without-repeating-characters/
  39. √丑数 -> (有更好的解法)https://leetcode.com/problems/ugly-number-ii/
  40. √第一个只出现一次的字符 -> https://leetcode.com/problems/first-unique-character-in-a-string/
  41. 数组中的逆序对 -> (升级版)https://leetcode.com/problems/reverse-pairs/#/description
  42. √两个链表的第一个公共节点 -> https://leetcode.com/problems/intersection-of-two-linked-lists/
  43. √在排序数组中查找数字 -> https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/submissions/
  44. 二叉搜索树的第K大节点 -> https://leetcode.com/problems/kth-smallest-element-in-a-bst/description/
  45. 二叉树的深度 -> https://leetcode.com/problems/maximum-depth-of-binary-tree/
  46. 数组中数字出现的次数 -> https://leetcode.com/problems/single-number-iii/
  47. 和为S的数字 —> https://leetcode.com/problems/two-sum/
  48. 翻转字符串 -> https://leetcode.com/problems/reverse-words-in-a-string/
  49. 队列的最大值 ->
@yanring
Copy link
Author

yanring commented Mar 13, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment