# GROKKING NOTES
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
- [ ] Unchecked
- [x] Checked
## Pattern: Sliding Window
- [ ]  # Close enough
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Two Pointers
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Fast & Slow pointers
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Merge Intervals
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] Could not find equivalent. Given a list of intervals with values, find the peak sum (i.e. if intervals are overlapping, sum their values)
- [ ] 
## Pattern: Cyclic Sort
- [ ] Couldn't find equivalent for the first question. The second question below encompasses the first one though. See  for how grokking the coding interview approached these problems. It uses the fact that we can sort the array in O(n) without comparison operators
- [ ] 
- [ ] 
- [ ] 
- [ ] combine  and 
- [ ] 
- [ ] 
## Pattern: In-place Reversal of a LinkedList
- [ ] 
- [ ] 
- [ ] 
- [ ] Next question is the same, but alternate each subgroup
- [ ] 
## Pattern: Tree Breadth First Search
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ]   # Close, not exact
- [ ]   # Close, grokk assumes non-perfect tree
- [ ] Next question is the same, but connect end nodes to the next level instead of null
- [ ] 
## Pattern: Tree Depth First Search
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Two Heaps
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Subsets
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Modified Binary Search
- [ ]   # Close enough. The grokking problem allows sorted input arrays as ascending or descending, which only introduces a simple check
- [ ] Did not find. Problem is find index of smallest element greater or equal to input value
- [ ] 
- [ ] 
- [ ] 
- [ ]  (with K == 1)
- [ ] 
- [ ] 
- [ ] 
- [ ] Similar to previous, but find the number of rotations of the array.
## Pattern: Bitwise XOR
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: Top 'K' elements
- [ ] Same as second question, but the first Grokking question wants the top K instead of the bottom K
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ] 
- [ ]  closest leetcode or  for exact
- [ ]  no leetcode equivalent found
- [ ] 
- [ ] 
- [ ] 
- [ ] 
## Pattern: K-way merge
- [ ] 
- [ ] Same as previous, but return the Kth smallest number
- [ ] 
- [ ] 
- [ ]  small difference, grokking has different sort order and wants the largest
## Pattern: 0/1 Knapsack
- [ ] 
- [ ]  or 
- [ ] 
- [ ]  similar concept, but problem description is more abstract.
- [ ]  similar, but return the number of combinations instead of the combinations
- [ ] 
- [ ] BONUS : Not in grokking, but I still found this very useful 
## Pattern: Topological Sort
- First problem is identical to the following three
- [ ] 
- [ ] 
  Same as above, but return all instead of any
- [ ] 
- [ ] 
- [ ] 
## Misc
- [ ]