From Chris

BFS, DFS, A* (be comfortable implementing them on ordered/unordered graphs, trees, and matrices). Memorize binary search algorithm (both iterative and recursive version), and be comfortable modifying it to work for other problems besides the standard “find element within sorted list”, e.g. “find element in rotated sorted array”.

Memorize the sliding window approach, this will help with problems related to strings, e.g “find longest sequence of sub string without repeating characters”

Hash Tables are your best friend. You usually reduce the complexity of most brute force solutions by storing useful information in a hash table, and later accessing it in O(1) time.

For all the above, memorize time/space complexity for follow-up questions.

Oh last thing, know the ideas behind sorting algorithms like mergesort and quicksort.

Leave a Comment