Interviews... Interviews never change.
So what is this all about? Well I wanted some change and I thought quitting my current job (LOL bad idea) and moving a couple cities away would revive my passion for "solving cool problems".
Anyways, 5 years of experience writing quality tested production code, and I can't solve any leetcode problems. Honestly, I think I was better at these interview problems when I was a scrub straight out of dev bootcamp.
So... Here we go again. Same shit different day. This will be an index of all the interview crap I need to know. Goodluck future me.
Stolen from geeksforgeeks
So when to use DFS over A*, when to use Dijkstra over A* to find the shortest paths ?
We can summarise this as below-
1) One source and One Destination-
→ Use A* Search Algorithm (For Unweighted as well as Weighted Graphs)
2) One Source, All Destination –
→ Use BFS (For Unweighted Graphs)
→ Use Dijkstra (For Weighted Graphs without negative weights)
→ Use Bellman Ford (For Weighted Graphs with negative weights)
3) Between every pair of nodes-
→ Floyd-Warshall
→ Johnson’s Algorithm
Now remember what any of these algorithms are.
- A* Search: https://www.geeksforgeeks.org/a-search-algorithm/ (like wtf is this name)
- Dijkstra: https://medium.com/basecs/finding-the-shortest-path-with-a-little-help-from-dijkstra-613149fbdc8e
- Traveling salesman with dynamic programming: https://www.youtube.com/watch?v=-JjA4BLQyqE (or you can read a garbo wikipedia page)
- Bellman-Held-Karp algorithm: https://medium.com/basecs/speeding-up-the-traveling-salesman-using-dynamic-programming-b76d7552e8dd
- Thank god for this website: https://www.geeksforgeeks.org/searching-algorithms/
- merge sort: https://www.geeksforgeeks.org/merge-sort/
- insertion sort: https://www.geeksforgeeks.org/insertion-sort/
- heap sort: https://www.geeksforgeeks.org/heap-sort/
-
Practice Your Code
-
Data Structures and Algorithms
- PDF of a book for DS and ALGO
- 500 Data Structures and Algorithms
- Top 10 Algos in Interview Questions
- Big-O Cheat Sheet(no https, gluck no hacksies plz)
-
General Interview Prep