Trie Interview Patterns
9 min read Trie (prefix tree) problems appear frequently in coding interviews. This guide covers the core patterns with Python implementations you can […] Read article
// algorithms
Coding patterns with templates and walkthroughs: two pointers, sliding window, DP, graphs — and the problems each one unlocks.
9 min read Trie (prefix tree) problems appear frequently in coding interviews. This guide covers the core patterns with Python implementations you can […] Read article
10 min read Range query problems appear frequently in competitive programming and technical interviews. Knowing which data structure to reach for – and Read article
8 min read Monotonic Deque Pattern – Sliding Window Maximum LeetCode 239. Given an array and window size k, return the maximum in Read article
7 min read Core Probability Concepts Probability questions test your ability to reason about uncertainty and expected behavior. Three concepts appear repeatedly in Read article
4 min read Advanced Array Interview Patterns Mastering a handful of array techniques unlocks dozens of LeetCode problems. This guide covers the six Read article
5 min read Sliding Window Maximum – Monotonic Deque (LC 239) O(n) solution using a monotonic decreasing deque storing indices. Each element is Read article
6 min read Chinese Remainder Theorem (CRT) CRT solves systems of congruences: given x ≡ ai (mod mi) where mi are pairwise coprime, Read article
8 min read Why Sorting Algorithms Still Matter in Interviews Interviewers at top tech companies still ask about sorting not to test memorization, Read article
6 min read Cycle Detection in Undirected Graphs from collections import deque # DFS approach: track parent to distinguish back edge from tree Read article
6 min read 2D Grid BFS and DFS Fundamentals from collections import deque DIRS = [(0,1),(0,-1),(1,0),(-1,0)] # right, left, down, up def bfs_grid(grid, Read article
6 min read Naive String Search and Why to Avoid It Naive string search: for each position i in text (0..n-m), compare pattern[0..m-1] Read article
6 min read 1D DP Space Optimization # Fibonacci: O(n) -> O(1) space def fib(n: int) -> int: if n <= 1: return Read article
6 min read Dijkstra’s Algorithm – Shortest Path (Non-negative Weights) import heapq from collections import defaultdict def dijkstra(graph: dict, start: int, n: int) Read article
4 min read Heap Fundamentals A heap is a complete binary tree where every parent satisfies the heap property (min-heap: parent = children). Read article
6 min read Recursion Fundamentals Every recursive solution has: a base case (stops the recursion), a recursive case (reduces the problem), and a Read article
What's missing, wrong, or worth adding? One line helps.
Sent — thank you. We read every one.