Skip to content

LinfengUP/jianzhi-Offer-Leetcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 

Repository files navigation

jianzhi-Offer-Leetcode

《剑指Offer》与Leetcode主站题目链接对应

本帖记录剑指offer在leetcode主站的原题。

  1. 数组中重复的数字 -> (中文版) https://leetcode.cn/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof/
  2. 二维数组中的查找 -> https://leetcode.cn/problems/search-a-2d-matrix-ii/
  3. 替换空格 -> (中文版) https://leetcode.cn/problems/ti-huan-kong-ge-lcof/
  4. 从尾到头打印链表 -> (中文版) https://leetcode.cn/problems/cong-wei-dao-tou-da-yin-lian-biao-lcof/
  5. 重建二叉树 -> https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
  6. 暂无
  7. 斐波那契数列/青蛙跳台阶 -> https://leetcode.cn/problems/fibonacci-number/
  8. √矩阵中的路径 -> https://leetcode.cn/problems/word-search/
  9. 机器人的运动范围 -> 没找到 -> (中文版)https://leetcode.cn/problems/ji-qi-ren-de-yun-dong-fan-wei-lcof/

  10. √二进制中1的个数 -> https://leetcode.cn/problems/number-of-1-bits/ ->(升级版)https://leetcode.cn/problems/counting-bits/
  11. √数值的整数次方(溢出) -> https://leetcode.cn/problems/powx-n/
  12. 打印从1到最大的n位数(溢出) -> 没找到
  13. √删除链表的节点 ->(简单版)https://leetcode.cn/problems/delete-node-in-a-linked-list/ ->(升级版)https://leetcode.cn/problems/remove-linked-list-elements
  14. ×表示数值的字符串 -> https://leetcode.cn/problems/valid-number/

  15. √调整数组顺序使奇数在偶数前 -> https://leetcode.cn/problems/sort-array-by-parity.
  16. √链表中倒数第K个节点 -> https://leetcode.cn/problems/remove-nth-node-from-end-of-list/
  17. 2023/12/16

  18. √链表中环的入口节点 -> https://leetcode.cn/problems/linked-list-cycle-ii
  19. √反转链表 -> 只用了递归,下次用循环 https://leetcode.cn/problems/reverse-linked-list/
  20. √合并两个排序的链表 -> https://leetcode.cn/problems/merge-two-sorted-lists/
  21. √树的子结构 -> * https://leetcode.cn/problems/subtree-of-another-tree/
  22. √二叉树的镜像 -> https://leetcode.cn/problems/invert-binary-tree
  23. √对称的二叉树 -> https://leetcode.cn/problems/symmetric-tree/
  24. √包含min函数的栈 -> https://leetcode.cn/problems/min-stack/

  25. √从上到下打印二叉树 -> https://leetcode.cn/problems/binary-tree-level-order-traversal/ -> 从下到上 https://leetcode.cn/problems/binary-tree-level-order-traversal-ii/ -> 之字形打印 https://leetcode.cn/problems/binary-tree-zigzag-level-order-traversal/
  26. √二叉树中和为某一值得路径 -> https://leetcode.cn/problems/path-sum/
  27. -------------------------------------------------------------------------------------------

  28. √二叉搜索树与双向链表 -> *(收费)https://leetcode.cn/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/ -> (牛客网)https://www.nowcoder.cn/practice/947f6eb80d944a84850b0538bf0ec3a5?tpId=13&tqId=11179&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking
  29. √序列化二叉树 -> https://leetcode.cn/problems/serialize-and-deserialize-binary-tree/
  30. √字符串的排列 -> (原理相同,leetcode用的数组)https://leetcode.cn/problems/permutations/ ->(有重复元素的情况) https://leetcode.cn/problems/permutations-ii
  31. √数组中出现次数超过一半的数字 -> https://leetcode.cn/problems/majority-element/ -> (升级版) https://leetcode.cn/problems/majority-element-ii/
  32. √最小的k个数 -> *(类似)https://leetcode.cn/problems/kth-largest-element-in-an-array/
  33. √数据流中的中位数 -> * https://leetcode.cn/problems/find-median-from-data-stream/
  34. √连续子数组的最大和 -> https://leetcode.cn/problems/maximum-subarray/
  35. √1~n整数中1出现的次数 -> https://leetcode.cn/problems/number-of-digit-one/submissions/
  36. √数字序列中某一位的数字 -> https://leetcode.cn/problems/nth-digit/
  37. √把数组排成最小的数 -> https://leetcode.cn/problems/largest-number/
  38. √把数字翻译成字符串 -> (递归or动归) https://leetcode.cn/problems/decode-ways/
  39. 礼物最大值 -> 未找到 -> (中文版) https://leetcode.cn/problems/li-wu-de-zui-da-jie-zhi-lcof/
  40. √最长不含重复字符的子字符串 -> https://leetcode.cn/problems/longest-substring-without-repeating-characters/
  41. √丑数 -> (有更好的解法)https://leetcode.cn/problems/ugly-number-ii/
  42. √第一个只出现一次的字符 -> https://leetcode.cn/problems/first-unique-character-in-a-string/
  43. 数组中的逆序对 -> (升级版)https://leetcode.cn/problems/reverse-pairs/#/description
  44. √两个链表的第一个公共节点 -> https://leetcode.cn/problems/intersection-of-two-linked-lists/
  45. √在排序数组中查找数字 -> https://leetcode.cn/problems/find-first-and-last-position-of-element-in-sorted-array/
  46. 二叉搜索树的第K大节点 -> https://leetcode.cn/problems/kth-smallest-element-in-a-bst/description/
  47. 二叉树的深度 -> https://leetcode.cn/problems/maximum-depth-of-binary-tree/
  48. 数组中数字出现的次数 -> https://leetcode.cn/problems/single-number-iii/
  49. 和为S的数字 —> https://leetcode.cn/problems/two-sum/
  50. 翻转字符串 -> https://leetcode.cn/problems/reverse-words-in-a-string/
  51. 队列的最大值 -> https://leetcode.cn/problems/sliding-window-maximum/
  52. n个骰子的点数 -> (中文版)https://leetcode.cn/problems/nge-tou-zi-de-dian-shu-lcof/
  53. 扑克牌中的顺子 -> (中文版)https://leetcode.cn/problems/bu-ke-pai-zhong-de-shun-zi-lcof/
  54. ??圆圈中最后剩下的数字 -> (中文版) https://leetcode.cn/problems/yuan-quan-zhong-zui-hou-sheng-xia-de-shu-zi-lcof/
  55. ---------------------------------------------------------------------------------------------

  56. 股票的最大利润 -> https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/
  57. 求1+2+…+n -> (中文版) https://leetcode.cn/problems/qiu-12n-lcof/
  58. 不用加减乘除做加法 -> (中文版) https://leetcode.cn/problems/bu-yong-jia-jian-cheng-chu-zuo-jia-fa-lcof/
  59. 构建乘积数组 -> (中文版) https://leetcode.cn/problems/gou-jian-cheng-ji-shu-zu-lcof/
  60. 把字符串转换成整数 -> https://leetcode.cn/problems/string-to-integer-atoi/
  61. 二叉搜索树的最近公共祖先 -> https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-search-tree/

About

剑指Offer与Leetcode对应题目

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published