Goals¶
- Understand various graph representations
- Recognize problems that can be solved with graphs
- Know how to quickly implement graph searches (BFS, DFS)
- Recognize topological sort graph problems
Keep in mind that during interviews coding questions are usually allotted 30-40 minutes. Given that time constraint, you should aim to spend around 15-20 minutes on each problem. So, figure out how to work through a particular class of problems, and then revisit them later on to cut down the time you spend on each problem.
Tuesday¶
Read the following articles and watch the youtube playlist that walks through graph problems.
- Graphs · codepath/compsci_guides Wiki
- Graph Traversals · codepath/compsci_guides Wiki
- Topological Sort · codepath/compsci_guides Wiki
- Detect Cycle in Directed Graph - YouTube
Thursday¶
Saturday¶
Other Problems¶
- Evaluate Division - LeetCode
- Kth Smallest Element in a BST - LeetCode
- Lowest Common Ancestor of a Binary Tree - LeetCode
- Journey to the Moon | HackerRank
Other Resources¶
(This section covers algorithms that will come up less frequently in interviews.) - Union Find, Disjoint Sets Guide - Union Find, Disjoint Sets Interview question bank - Shortest Paths Algorithms Guide - Shortest Paths Algorithms Interview Question Bank - Minimum Spanning Trees Guide - Minimum Spanning Trees Interview Question Bank