# ambition
# 总结一下面试常考的算法题
希望可以帮助每一位想要提升自己面试能力的同学。
对于每一道算法题会**总结代码、时间复杂度**以及一些**好的blog**
---
## 排序(sort)
[LintCode 463 Sort Integers](https://github.com/only-you/-/blob/master/sort/sort-integers.md)
[LintCode 464 Sort Integers II](https://github.com/only-you/-/blob/master/sort/sort_integers2.md)
[LeetCode 148 Sort List](https://github.com/only-you/-/blob/master/sort/sortList.md)
[LeetCode 215 Kth Largest Element in an Array](https://github.com/only-you/-/blob/master/sort/kthLargest.md)
[LintCode 532 Reverse Pairs](https://github.com/only-you/-/blob/master/sort/reversePairs.md)
[LeetCode 315 Count of Smaller Numbers After Self](https://github.com/only-you/-/blob/master/sort/315.md)
[LeetCode 207 Course Schedule](https://github.com/only-you/-/blob/master/sort/topoSort1.md)
[LeetCode 210 Course Schedule II](https://github.com/only-you/-/blob/master/sort/topoSort2.md)
## 数组(array)
[LeetCode 28 Implement strStr()](https://github.com/only-you/-/blob/master/array/strStr.md)
[LeetCode 1 Two Sum](https://github.com/only-you/-/blob/master/array/twoSum.md)
[LeetCode 189 Rotate Array](https://github.com/only-you/-/blob/master/array/rotate.md)
[LintCode 31 Partition Array](https://github.com/only-you/-/blob/master/array/partition.md)
[LintCode 373 Partition Array by Odd and Even](https://github.com/only-you/-/blob/master/array/oddEven.md)
[LintCode 144 Interleaving Positive and Negative Numbers](https://github.com/only-you/-/blob/master/array/interleave.md)
[LeetCode 54 Spiral Matrix](https://github.com/only-you/interview/blob/master/array/matrix.md)
[LeetCode 59 Spiral Matrix II](https://github.com/only-you/interview/blob/master/array/matrixii.md)
[LeetCode 53 Maximum Subarray](https://github.com/only-you/interview/blob/master/array/53.md)
[LeetCode 152 Maximum Product Subarray](https://github.com/only-you/interview/blob/master/array/152.md)
[LintCode 138 Subarray Sum](https://github.com/only-you/interview/blob/master/array/Subarray.md)
[LintCode 139 Subarray Sum Closest](https://github.com/only-you/interview/blob/master/array/139.md)
[LeetCode 392 Is Subsequence](https://github.com/only-you/interview/blob/master/array/392.md)
[LeetCode 136 Single Number](https://github.com/only-you/interview/blob/master/array/Single.md)
[LeetCode 137 Single Number II](https://github.com/only-you/interview/blob/master/array/137.md)
[LeetCode 260 Single Number III](https://github.com/only-you/interview/blob/master/array/260.md)
[LeetCode 263 Ugly Number](https://github.com/only-you/interview/blob/master/array/263.md)
[LeetCode 264 Ugly Number II](https://github.com/only-you/interview/blob/master/array/264.md)
[LeetCode 295 Find Median from Data Stream——hard](https://github.com/only-you/interview/blob/master/array/295.md)
[LeetCode 4 Median of Two Sorted Arrays——very hard](https://github.com/only-you/interview/blob/master/array/4.md)
[LeetCode 239 Sliding Window Maximum——hard](https://github.com/only-you/interview/blob/master/array/239.md)
[LeetCode 480 Sliding Window Median——hard](https://github.com/only-you/interview/blob/master/array/480.md)
[LintCode 130 Heapify——medium](https://github.com/only-you/interview/blob/master/array/130.md)
[LeetCode 347 Top K Frequent Elements——medium](https://github.com/only-you/interview/blob/master/array/347.md)
[LeetCode 128 Longest Consecutive Sequence——hard](https://github.com/only-you/interview/blob/master/array/128.md)
## 双指针(two pointers)
[LeetCode 15 3Sum——medium](https://github.com/only-you/interview/blob/master/twoPointers/15.md)
[LeetCode 16 3Sum Closest——medium](https://github.com/only-you/interview/blob/master/twoPointers/16.md)
[LeetCode 18 4Sum——medium](https://github.com/only-you/interview/blob/master/twoPointers/18.md)
[LeetCode 42 Trapping Rain Water——hard](https://github.com/only-you/interview/blob/master/twoPointers/42.md)
## 链表(linkedList)
```
注意以下两点:
1、当你预估到返回的链表头结点可能跟原有的链表头节点不一样时,建一个虚拟节点dummy,值任意,比如0,最后返回的新的链表头结点就是dummy.next,这一条非常好用!
2、当操作一个链表节点的时候,时刻想一想要访问的链表节点是否为null
```
[LeetCode 206 Reverse Linked List——easy](https://github.com/only-you/interview/blob/master/linkedList/206.md)
[LeetCode 86 Partition List——medium](https://github.com/only-you/interview/blob/master/linkedList/86.md)
[LeetCode 92 Reverse Linked List II——medium](https://github.com/only-you/interview/blob/master/linkedList/92.md)
[LeetCode 83 Remove Duplicates from Sorted List——easy](https://github.com/only-you/interview/blob/master/linkedList/83.md)
[LeetCode 82 Remove Duplicates from Sorted List II——medium](https://github.com/only-you/interview/blob/master/linkedList/82.md)
[LeetCode 237 Delete Node in a Linked List——easy](https://github.com/only-you/interview/blob/master/linkedList/237.md)
[LeetCode 19 Remove Nth Node From End of List——medium](https://github.com/only-you/interview/blob/master/linkedList/19.md)
[LeetCode 61 Rotate List——medium](https://github.com/only-you/interview/blob/master/linkedList/61.md)
[LeetCode 203 Remove Linked List Elements——easy](https://github.com/only-you/interview/blob/master/linkedList/203.md)
[LeetCode 2 Add Two Numbers——medium](https://github.com/only-you/interview/blob/master/linkedList/2.md)
[LeetCode 445 Add Two Numbers II——medium](https://github.com/only-you/interview/blob/master/linkedList/445.md)
[LeetCode 328 Odd Even Linked List](https://github.com/only-you/interview/blob/master/linkedList/328.md)
[LeetCode 234 Palindrome Linked List](https://github.com/only-you/interview/blob/master/linkedList/234.md)
[LeetCode 24 Swap Nodes in Pairs](https://github.com/only-you/interview/blob/master/linkedList/24.md)
[LeetCode 160 Intersection of Two Linked Lists](https://github.com/only-you/interview/blob/master/linkedList/160.md)
[LeetCode 141 Linked List Cycle——easy](https://github.com/only-you/interview/blob/master/linkedList/141.md)
[LeetCode 142 Linked List Cycle II——medium](https://github.com/only-you/interview/blob/master/linkedList/142.md)
[LeetCode 21 Merge Two Sorted Lists——easy](https://github.com/only-you/interview/blob/master/linkedList/21.md)
[LeetCode 23 Merge k Sorted Lists——hard](https://github.com/only-you/interview/blob/master/linkedList/23.md)
[LeetCode 138 Copy List with Random Pointer——medium](https://github.com/only-you/interview/blob/master/linkedList/138.md)
[LeetCode 143 Reorder List——medium](https://github.com/only-you/interview/blob/master/linkedList/143.md)
[LeetCode 25 Reverse Nodes in k-Group——hard](https://github.com/only-you/interview/blob/master/linkedList/25.md)
[LeetCode 146 LRU Cache——hard](https://github.com/only-you/interview/blob/master/linkedList/146.md)
## 二分(binary search)
```
需要注意的点有:
1、start 、end在while循环的条件、到底是start<end、还是start<=end;要仔细举例确认
2、还有mid值的计算 mid = start + (end-start)/2; 有时候为了跳出循环;可以 mid = start + (end-start)/2 + 1;
```
[LeetCode 35 Search Insert Position——easy](https://github.com/only-you/interview/blob/master/binarySearch/35.md)
[LeetCode 34 Find First and Last Position of Element in Sorted Array——medium](https://github.com/only-you/interview/blob/master/binarySearch/34.md)
[LeetCode 278 First Bad Version——easy](https://github.com/only-you/interview/blob/master/binarySearch/278.md)
[LeetCode 162 Find Peak Element——medium](https://github.com/only-you/interview/blob/master/binarySearch/162.md)
[LeetCode 154 Find Minimum in Rotated Sorted Array II——hard](https://github.com/only-you/interview/blob/master/binary
考试类精品--总结一下面试常考的算法题,希望可以帮助每一位想要提升自己面试能力的同学。对于每一道算法题会总结代码、时.zip
需积分: 5 25 浏览量
2024-02-06
10:15:01
上传
评论
收藏 7.69MB ZIP 举报
码农阿豪
- 粉丝: 1w+
- 资源: 1754
最新资源
- 基于python弹幕情感分析的直播高光时刻判断模型设计与系统实现
- (精品)第4章数控铣床和加工中心工艺与编程.ppt
- (精品)第6章卫星移动通信系统.ppt
- TI杯大奖赛本科组+研究生组论文+源代码+PCB基于TMS320F28335的超声波流量计
- TI杯大奖赛本科组+研究生组论文+源代码+PCB基于TMS320F2812的图像识别智能跟踪小车
- PuTTY Connection Manager ( puttyCM )
- TI杯大奖赛本科组+研究生组论文+源代码+PCB基于TMS320F2812的节能环保型矩阵式变频器的开发
- C语言:消息通信实例代码,主函数实现消息发送与消息接收功能
- (HTML+CSS+jQuery)学生仿手机端静态外卖项目
- 车载软件的OTA方案需求确认内容
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈