Algorithms
86 articles to help you prepare for your next interview.
Airbnb's engineering challenges sit at the intersection of marketplace dynamics, real-time personalization, and global trust at scale.
API design is one of the most underprepared topics in system design interviews. Candidates spend weeks on database sharding and message queues.
Google DeepMind is not a product engineering organization that happens to do AI research.
Getting laid off is disorienting in a way that is hard to describe until it happens to you.
A is the gold standard for pathfinding in interviews. It combines Dijkstra's optimality with heuristic-guided search to find shortest paths faster.
Understand Bloom filters, counting filters, and probabilistic data structures—when to trade accuracy for space efficiency.
Master the Elastic interview process with deep Elasticsearch knowledge, observability platforms, and building distributed search systems at scale.
Complete guide to network flow interview problems—Ford-Fulkerson, Edmonds-Karp, and real applications like bipartite matching.
Navigate the Research Triangle's booming tech scene. From SAS and Red Hat to startups and Apple expanding.
Master skip lists—the probabilistic alternative to balanced trees with excellent concurrent access properties.
Bit manipulation interview problems — XOR properties, bit counting, bitmask DP, power-of-two tricks, and the patterns appearing at Google, Meta, and Amazon.
Complete reference for data structure interview questions — time/space complexity for all major structures, when to use each, tradeoffs.
A practical framework for choosing the right data structure in coding interviews — hash maps, heaps, tries, segment trees.
How to implement core data structures for technical interviews — linked list, stack, queue, binary tree, hash map, min-heap — with clean code.
Go beyond basic dynamic programming — interval DP, digit DP, bitmask DP, and the optimization techniques that distinguish senior engineers in coding interviews.
Complete guide to graph algorithm interview questions — DFS, BFS, topological sort, shortest paths, union-find.
Complete guide to graph algorithms for coding interviews — BFS, DFS, shortest paths, cycle detection, topological sort, union-find, and when to use each.
Master amortized analysis — aggregate method, accounting method, potential method — through dynamic arrays, stacks with multi-pop.
Advanced backtracking for technical interviews — N-Queens, Sudoku solver, word search, regular expression matching, generate valid parentheses, subsets.
Advanced binary search patterns for technical interviews — search in rotated sorted array, find minimum in rotated array, search a 2D matrix.
Master the hardest binary tree interview problems with a pattern-based approach. Covers lowest common ancestor variants, path sum problems.
Master advanced bit manipulation techniques: XOR-based algorithms, bitmask DP, counting set bits efficiently.
A practical guide to bit manipulation for software engineering interviews — covering the core operations, XOR properties, counting bits.
Essential bit manipulation patterns for interviews — XOR tricks, power of two checks, counting set bits, bit masking.
Master the backtracking framework for generating combinations, permutations, and subsets.
Deep complexity analysis for senior interviews — amortized analysis, space-time tradeoffs, best/worst/average case distinctions, recurrence relations.
A practical guide to combinatorics in interviews — binomial coefficients, stars and bars, inclusion-exclusion, Catalan numbers, Pascal's triangle.
Interview patterns for data streams — finding median from a data stream with two heaps, running mean/variance, reservoir sampling for random sampling.
A complete interview review of data structures — time and space complexity, implementation details.
How to design custom data structures in coding interviews — median finder, LFU cache, stack with min, iterator design, random set.
Advanced divide and conquer patterns for coding interviews — closest pair of points, count inversions, median of two sorted arrays.
Master bitmask DP for technical interviews: traveling salesman problem, minimum set cover, optimal assignment, subset enumeration.
Master interval dynamic programming for technical interviews — matrix chain multiplication, burst balloons, minimum cost to cut a stick.
Tree DP patterns for coding interviews — rerooting technique, diameter, maximum path sum, subtree counting.
Master the most common string DP patterns in coding interviews — from LCS and edit distance to palindromes, interleaving strings, and regex matching.
Master dynamic arrays for technical interviews — amortized O(1) append, resizing strategies, ArrayList vs LinkedList tradeoffs.
A systematic approach to recognizing and solving DP problems in interviews — the 5 DP categories, state design, transition formulation.
Master the fast/slow pointer (Floyd's tortoise and hare) technique — detect cycles in linked lists, find cycle start, find the middle node, happy number.
Advanced graph problems for senior-level interviews — strongly connected components (Tarjan's, Kosaraju's), articulation points, bridges.
A rigorous guide to advanced graph algorithms for software engineering interviews — covering shortest path algorithms, their trade-offs, network flow.
MST algorithms for coding interviews — Kruskal's with Union-Find, Prim's with priority queue, when to use each.
Master Dijkstra's algorithm, Bellman-Ford, Floyd-Warshall, BFS for unweighted graphs, and an intro to A* — with interview patterns and when to use each.
Go beyond basic greedy with interval scheduling maximization, Huffman coding, fractional knapsack, activity selection.
Master greedy algorithms for technical interviews — when greedy is optimal, proof techniques, activity selection, interval scheduling, Huffman coding.
Deep dive into hash maps for technical interviews — collision resolution, load factor, hash function design, open addressing vs chaining.
All interval problem patterns for coding interviews — merge intervals, insert interval, meeting rooms, minimum platforms.
A thorough guide to Kadane's algorithm — the linear-time maximum subarray solution — and its essential variants: circular array, maximum product subarray.
Master the advanced linked list patterns that consistently appear in FAANG and top-tier engineering interviews, including cycle detection.
Master LCS and its family of problems — edit distance, shortest common supersequence, LCS of three strings, space-optimized variants.
LRU cache implementation with doubly linked list and hash map, LFU cache, cache eviction policies comparison, and the system design patterns caches enable.
A systematic guide to solving matrix and 2D grid problems in interviews, covering BFS/DFS traversal patterns, island counting, shortest paths.
Master the essential 2D matrix patterns for coding interviews: in-place rotation, spiral traversal, word search, island counting, and matrix BFS/DFS.
Advanced merge sort applications for coding interviews — counting inversions, external sort for large datasets, merge K sorted lists.
Master monotonic stacks and queues for technical interviews — next greater element, stock span, largest rectangle in histogram, sliding window maximum.
Network flow for senior engineering interviews — Ford-Fulkerson and Edmonds-Karp max flow, the max-flow min-cut theorem, bipartite matching as flow.
How to solve expression parsing problems in coding interviews — implement a calculator with parentheses, tokenize mathematical expressions.
How prefix sums solve range queries, subarray problems, and 2D grid problems in O(1) per query — including difference arrays, 2D prefix sums.
How to approach probability, expected value, random algorithms, Monte Carlo simulations, and randomized data structures in technical interviews.
Range query data structures for senior coding interviews — segment tree with lazy propagation, Binary Indexed Tree (Fenwick tree), sparse table for RMQ.
A systematic guide to recursion problems in technical interviews — covering backtracking templates for permutations and subsets.
Advanced recursion patterns for interviews — memoization vs tabulation, tree recursion, mutual recursion, tail recursion.
Master segment trees for technical interviews — range sum queries, range minimum/maximum, lazy propagation, when to use segment trees vs BIT.
Deep-dive into sliding window interview problems — fixed window, variable window with shrinkable right/left pointers, character frequency maps.
Complete guide to all sliding window algorithm variants for interviews: fixed-size windows, variable-size windows, minimum/maximum window problems.
A practical guide to sorting algorithms for software engineering interviews — complexity analysis, implementation pitfalls.
Stack patterns for senior coding interviews — monotonic stack for next greater element, largest rectangle in histogram, daily temperatures.
Go beyond basic stack and queue mechanics to master the advanced patterns — monotonic stacks, sliding window deques, and priority queue strategies.
String matching algorithms for advanced coding interviews — KMP failure function, Rabin-Karp rolling hash, Z-algorithm.
Master advanced string algorithms for technical interviews — the KMP pattern matching algorithm, Rabin-Karp rolling hash.
Master the three main approaches to Top-K and K-th element interview problems — heap-based selection, QuickSelect for O(n) average.
Complete guide to topological sort — Kahn's BFS algorithm, DFS-based approach, cycle detection, and how to solve Course Schedule I & II, alien dictionary.
Beyond recursive traversals — iterative DFS with explicit stack, Morris traversal for O(1) space, level-order variations.
Advanced binary tree interview patterns — lowest common ancestor, serialize/deserialize, path sum variants, BST operations.
Go beyond basic trie implementation — learn auto-complete with ranking, Word Search II with pruning, prefix sum trees.
The two heaps pattern for coding interviews — finding median from a data stream, sliding window median, finding the optimal meeting point.
Go beyond the basic two-pointer pattern with in-depth coverage of the classic hard problems: 3Sum with duplicate handling, Container With Most Water.
Master the Union-Find data structure for coding interviews — path compression, union by rank, connected components, cycle detection.
How to approach hard LeetCode problems — which categories of hards actually appear in interviews, time/effort tradeoff.
Master monotonic stacks for coding interviews — next greater/smaller element, largest rectangle in histogram, daily temperatures, and stock span problems.
How to recognize and solve monotonic stack and deque problems in technical interviews — next greater element, sliding window maximum, largest rectangle.
Master segment trees for coding interviews — range sum, range min/max, lazy propagation, and the classic problems where segment trees are the right tool.
Master advanced SQL for interviews — window functions, recursive CTEs, execution plans, index strategies, EXPLAIN ANALYZE.
Complete guide to string algorithm interview questions — KMP, Rabin-Karp, two-pointer string problems, anagram detection, longest common prefix.
Complete guide to tree algorithm interview questions — inorder/preorder/postorder traversal, LCA, BST operations, balanced trees.
Complete guide to two-pointer and sliding window interview patterns — when to use each variant, the template code.
The definitive DSA reference for technical interviews — Big O complexity tables, when to use each data structure, and patterns mapping to real coding problems.