Coding Interview Patterns
Spot the pattern, then fill in the code
Coding Interview Patterns is a Bertopia flashcard course of 224 cards: spot the pattern, then fill in the code. It covers arrays, hashing and matrices; two pointers; sliding window and prefix sums; stacks and monotonic stacks; binary search; linked lists; trees and tries; heaps and top k; backtracking; graphs, BFS and DFS; graph algorithms and union find; dynamic programming; greedy; intervals; bit manipulation; design a data structure.
Worked answers by topic
- Array, hash map and matrix interview questions (20 questions)
- Two pointers coding interview questions (11 questions)
- Sliding window and prefix sum interview questions (14 questions)
- Stack and monotonic stack interview questions (11 questions)
- Binary search coding interview questions (11 questions)
- Linked list coding interview questions (12 questions)
- Tree and trie coding interview questions (20 questions)
- Heap and top k coding interview questions (11 questions)
- Backtracking coding interview questions (13 questions)
- Graph, BFS, DFS and union find interview questions (29 questions)
- Dynamic programming interview questions (22 questions)
- Greedy and intervals coding interview questions (21 questions)
- Bit manipulation coding interview questions (10 questions)
- Data structure design interview questions (18 questions)
Sources
6 sources
- NeetCode solutions and problem list, NeetCode
- walkccc LeetCode solutions, walkccc
- LeetCode problem pages, LeetCode
- Python programming FAQ, Python Software Foundation
- Python standard library: heapq, bisect, collections, functools, Python Software Foundation
- Bertopia code-drawn pictures, Bertopia