Repository navigation
01 Online Resources & Books
mccornet edited this page Jul 31, 2021
·
3 revisions
- 14 Patterns
- Geeks for Geeks - Top Algo's and Data Structures
- MIT 6.006 Intro Algorithms
- Algorithm Visualization
- Common-Sense Guide to Data Structures and Algorithms
- Problem Solving with Algorithms and Data Structures using Python
- Programming Interview Problems: Dynamic Programming
- https://seanprashad.com/leetcode-patterns/
- Must do DP (LC)
- Other LC List post
- 1k problems post
- Problems listed by quality (sheet)
Taken from the tips page on:
If input array is sorted then
- Binary search
- Two pointers
If asked for all permutations/subsets then
- Backtracking
If given a tree then
- DFS
- BFS
If given a graph then
- DFS
- BFS
If given a linked list then
- Two pointers
If recursion is banned then
- Stack
If must solve in-place then
- Swap corresponding values
- Store one or more different values in the same pointer
If asked for maximum/minumum subarray/subset/options then
- Dynamic programming
If asked for top/least K items then
- Heap
If asked for common strings then
- Map
- Trie
Else
- Map/Set for O(1) time & O(n) space
- Sort input for O(nlogn) time and O(1) space