专栏的正文部分已经结束,相信这半年的时间,你学到了很多,究竟学习成果怎样呢?
关于数组和链表的几个必知必会的代码实现
数组
- 实现一个支持动态扩容的数组
- 实现一个大小固定的有序数组,支持动态增删改操作
-
链表
实现单链表、循环链表、双向链表,支持增删操作
- 实现单链表反转
- 实现两个有序的链表合并为一个有序链表
-
对应的 LeetCode 练习题(@Smallfly 整理)
数组
Three Sum(求三数之和)
英文版:https://leetcode.com/problems/3sum/
中文版:https://leetcode-cn.com/problems/3sum/
- Majority Element(求众数)
英文版:https://leetcode.com/problems/majority-element/
中文版:https://leetcode-cn.com/problems/majority-element/
- Missing Positive(求缺失的第一个正数)
英文版:https://leetcode.com/problems/first-missing-positive/
中文版:https://leetcode-cn.com/problems/first-missing-positive/
链表
- Linked List Cycle I(环形链表)
英文版:https://leetcode.com/problems/linked-list-cycle/
中文版:https://leetcode-cn.com/problems/linked-list-cycle/
- Merge k Sorted Lists(合并 k 个排序链表)
英文版:https://leetcode.com/problems/merge-k-sorted-lists/
中文版:https://leetcode-cn.com/problems/merge-k-sorted-lists/
做完题目之后,你可以点击“请朋友读”,把测试题分享给你的朋友,说不定就帮他解决了一个难题。
