Introduce
Source:How can I learn algorithms and data structures from scratch? - Quora
It feels like this site has a foreign flavor of Zhihu
Plan
Day −∞−∞ to 0: Stick to a programming language like C or C++. Make sure that you are comfortable with pointers/objects.
对象和指针理解
Day 1: Understand the concept of Algorithmic complexity. Skip the theory for now, but for every piece of code you write, you should be able to derive both time and space complexity.
时间复杂度和空间复杂度了解,可以估算算法的时间和空间复杂度,理论部分可以跳过
Day 2 - 10: Let’s start with some simple data structures,
- Arrays
- Linked Lists
- Strings
- Stacks
- Queues
Understand their basic operations (insert, delete, search, traversal) and their complexity - Big-O Algorithm Complexity Cheat Sheet, and code them all.
理解常见线性和非线性数据结构的增删改查的细节。
Day 11 - 25: Let’s now learn some simple algorithms,
- Sorting - Insertion sort, Merge sort, Quick sort, Heap sort, Bucket sort, Counting sort, Radix sort, External sorting
- Search - Linear search, Binary Search (along with its variants).
- Prime Numbers - Sieve of Eratosthenes, Primality test
- Strings - String searching, LCS, Palindrome detection
- Miscellaneous - Euclidean algorithm, Matrix multiplication, Fibonacci Numbers, Pascal's Triangle, Max Subarray problem
归纳:
- 常见排序算法
- 搜索算法
- 素数
- 字符串查找
- 杂七杂八算法
Day 26 - 50: Once you are comfortable with everything above, start doing problems from,
- Cracking the Coding Interview
- Elements of Programming Interviews
- Programming Interviews Exposed: Secrets to Landing Your Next Job
- GeeksforGeeks
- HackerRank
- InterviewBit
面试常考算法,然后需要反复练习常见数据结构的相关算法
Stick to chapters of arrays, linked lists, strings, stacks, queues and complexity.
Day 51 - 60: Let’s learn some non-linear data structures,
非线性结构算法学习
- Tree
- Binary Tree, Binary Search Tree - Tree traversals, Lowest common ancestor, Depth, Height & Diameter, Finding k-th smallest element
- Heaps
- Hash table - 4 sum problem, Checking if sudoku solution is valid
- Graph - Breadth-first search, Depth-first search, Topological sorting, Minimum spanning tree, Shortest path problem,
二叉树、二叉树查找
哈希表
垃圾回收算法。
图
Day 61- 90: Refer to the previous resources and start doing problems from trees, hash tables, heaps and graphs.
参考之前的练习,使用非线性结构的思维模式重做一遍。
Day 91 - 100: Understand Computational complexity theory and NP-completeness, Knapsack problem, Travelling salesman problem, SAT problem and so on.
理解计算机复杂性理论,NP,SAT,TSP、动态规划等。
Day 101 - ∞∞: You are now better than most of the CS undergrads. Keep revising the above topics and start competitive programming! Good luck!
你现在比大多数的CS本科生都要好。继续复习上述题目,并开始竞争性的编程! 祝您好运!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。