For each week, try to solve as many problems as you can from each category!
-
Arrays:
-
Basic math:
-
Simple string manipulation:
-
Simple bitwise manipulation:
-
Hashmaps and sets:
-
Union find:
- Hash maps and hash sets
- https://leetcode.com/problems/jewels-and-stones/
- https://leetcode.com/problems/unique-morse-code-words/
- https://leetcode.com/problems/happy-number/
- https://leetcode.com/problems/uncommon-words-from-two-sentences/
- https://leetcode.com/problems/distribute-candies/
- https://leetcode.com/problems/groups-of-special-equivalent-strings/
- https://leetcode.com/problems/intersection-of-two-arrays/
- https://leetcode.com/problems/valid-sudoku/
- https://leetcode.com/problems/isomorphic-strings/
- https://leetcode.com/problems/word-pattern/
- https://leetcode.com/problems/design-hashmap/
- https://leetcode.com/problems/design-hashset/
- Multisets
- https://leetcode.com/problems/find-all-anagrams-in-a-string/
- Use a multiset for this one. You can also solve it without using one. How? Try to solve it both ways. How do the two solutions compare?
- https://leetcode.com/problems/first-unique-character-in-a-string/
- https://leetcode.com/problems/subdomain-visit-count/
- https://leetcode.com/problems/find-the-difference/
- https://leetcode.com/problems/most-common-word/
- https://leetcode.com/problems/sort-characters-by-frequency/
- https://leetcode.com/problems/set-mismatch/
- This one has a few “clever” solutions but feel free to use a simple multiset solution.
- https://leetcode.com/problems/number-of-atoms/
- This one is more difficult than the average interview question but it is good exercise! You will need to build a simple parser in addition to using a multiset.
- https://leetcode.com/problems/find-all-anagrams-in-a-string/
- Tries
-
Greedy algorithms
-
Binary search
-
Sorting
- https://leetcode.com/problems/valid-anagram
- https://leetcode.com/problems/array-partition-i
- https://leetcode.com/problems/merge-intervals
- Use sorting, not a multiset (you solved this problem using a multiset last week) https://leetcode.com/problems/find-all-anagrams-in-a-string
-
Recursion and memoization: make sure you use memoization if applicable for the problems below
-
Dynamic Programming: same problems as above, but use dynamic programming this time
-
Linked lists
-
- Hint: This one is a bit harder. You will need to use a doubly linked list and a hash map to get O(1) time complexity for both operations.
-
Stacks
-
Queues
-
Heaps
-
Combinatorial generation
-
Backtracking
-
Trees
- https://leetcode.com/problems/n-ary-tree-postorder-traversal
- https://leetcode.com/problems/leaf-similar-trees
- https://leetcode.com/problems/same-tree
- https://leetcode.com/problems/sum-of-left-leaves
- https://leetcode.com/problems/diameter-of-binary-tree
- https://leetcode.com/problems/longest-univalue-path
- https://leetcode.com/problems/find-bottom-left-tree-value
-
Graphs
- https://leetcode.com/problems/course-schedule
- https://leetcode.com/problems/island-perimeter
- https://leetcode.com/problems/is-graph-bipartite
- https://leetcode.com/problems/word-search
- https://leetcode.com/problems/course-schedule-ii
- https://leetcode.com/problems/longest-increasing-path-in-a-matrix
- https://leetcode.com/problems/network-delay-time/
- Write a simple preforking echo server, without looking at the reference.
- Write a multithreaded merge-sort https://www.geeksforgeeks.org/merge-sort-using-multi-threading/
Network
-
https://jvns.ca/blog/2017/06/03/async-io-on-linux--select--poll--and-epoll/
-
https://idea.popcount.org/2017-01-06-select-is-fundamentally-broken/
-
https://www.howtogeek.com/190014/htg-explains-what-is-the-difference-between-tcp-and-udp/
-
Python/Ruby
Multithreading
-
https://stackoverflow.com/questions/34510/what-is-a-race-condition
-
https://www.slashroot.in/difference-between-process-and-thread-linux
-
Python
-
Java
File system