由于剑指offer(第二版)并没有提供相应的OJ系统,本仓库的题解代码针对的OJ题目主要来源于leetcode,leetcode上没有的用牛客网做补充,有些题目题面可能略有出入,但解题思路是类似的。附上github源码地址 ,撒娇打滚求star哦~~ღ( ´・ᴗ・` )比心
剑指Offer题目 | 对应的leetcode/牛客网题目 | csdn题解博客 | 分类 |
---|---|---|---|
1. 赋值运算符函数 | |||
2. 实现Singleton模式 | |||
3. 数组中重复的数字 | leetcode 287. Find the Duplicate Number | C++ | 数组、散列、二分、查找链表中的环 |
4. 二维数组中的查找 | leetcode 240. Search a 2D Matrix II | C++ | 数组 |
5. 替换空格 | 牛客网 替换空格 | C++ | 字符串处理 |
5. 原地合并两个有序数组 | leetcode 88. Merge Sorted Array | C++ | 数组 |
6. 从尾到头打印链表 | 牛客网 从尾到头打印链表 | C++ | 数组 |
7. 根据前序中序序列重建二叉树 | leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal | C++ | 二叉树 |
7. 根据后序中序序列重建二叉树 | leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal | C++ | 二叉树 |
8. 二叉树的下一个节点 | 牛客网 二叉树的下一个节点 | C++ | 二叉树 |
9. 用两个栈实现队列 | leetcode 232. Implement Queue using Stacks | C++ | 栈和队列 |
9. 用两个队列实现一个栈 | leetcode 225. Implement Stack using Queues | C++ | 栈和队列 |
10. 斐波那契数列 | leetcode 509. Fibonacci Number | C++ | 斐波那契数列 |
10. 青蛙跳台阶 | leetcode 70. Climbing Stairs | C++ | 斐波那契数列 |
11. 旋转数组的最小数字 | 153. Find Minimum in Rotated Sorted Array、154. Find Minimum in Rotated Sorted Array II | C++ | 二分查找 |