LeetCode
The holy grail of programming interviews. Plus I think it’s actually pretty fun → focusing more on Competitive Programming because it’s harder
I actually suck at LeetCode for some reason (started summer 2022)
- 2022-12-22: Actually getting better, I can do hards
You can use Binarysearch to practice by company (NOPE, site is down)
Weaknesses:
- Knapsack DP
- Implement the Sorting Algorithms
- Quickselect to select the k-th smallest element in time
- Be faster at tree algorithms
However, I think the Codeforces problems are a lot more rewarding to solve, I guess just because they are harder.
Main Topics
- Sliding Window
- Two Pointers
- Merge Intervals
- Cyclic Sort
- Binary Search
- Shuffling an array
- Permutations
- Sliding Window
- Cycle Detection
- BFS
- DFS
- Topological Sort
- Backtracking
https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed
Other CP Topics
- NP-Complete
- Game Theory
- Probability
- Convex Hull
- Hamming Distance
- Manhattan Distance
- Euclidean Distance
Algorithms
Problems
Strategy
- Attempt the problem (obviously)
- If too hard, see if you have solved similar problems in the past
- Read the discussion forum, but just look at the titles for inspiration
- If it still doesn’t work, check the answer, but do not just copy paste. Try to understand and put your own implementation of it without looking at the original solutions
Leetcode Tip (NEVER DO THE SAME PROBLEMS)
Do not repeat trying the same problems, because you are actually trying to get better at pattern recognition.
If the interviewer gives you a variation of the problem you solved, then you don’t know how to exactly tackle it, so there is no point.