Tips for solving leetcode codings interview problems
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/minimum 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
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/minimum 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
π5
Python Cheat Sheet.pdf
677.7 KB
This cheat sheet includes basic python required for data analysis excluding pandas, numpy & other libraries
π3
Advanced Concepts in Operating Systems (Indian Edition).pdf
331.2 MB
Advanced Concepts in Operating Systems
Mukesh Singhal, 2008 (scanned)
Mukesh Singhal, 2008 (scanned)
HTML Tags List.pdf
115.1 KB
HTML Tags List π
Do not forget to React β€οΈ to this Message for More Content Like this
Thanks For Joining All β€οΈπ
Do not forget to React β€οΈ to this Message for More Content Like this
Thanks For Joining All β€οΈπ
π5β€1