TheScalableDev

Catalog

Follow a path, one topic at a time.

150 interactive traces. Work through each track in order - your progress is saved to your account.

Sign in to save your progress and unlock members-only lessons.

Foundations

syncing…
  1. BASICSBeginnerContinue →FreeFoundations - Big-O NotationThe language every engineer uses to describe speed - what O(n), O(log n), and friends actually measure, and why constants stop mattering.10m
  2. BASICSBeginnerFreeFoundations - Logarithms for EngineersA logarithm asks 'how many times must I halve (or double)?' - the math hiding inside binary search, balanced trees, and every O(log n) promise.8m
  3. BASICSBeginnerMembersFoundations - Binary Numbers & Bitwise OperationsComputers count in ones and zeros - learn to read binary, meet the bitwise operators, and understand why powers of two rule memory.9m
  4. BASICSBeginnerMembersFoundations - Arrays & MemoryArrays live side by side in memory - which is why indexing is instant, inserting in the middle is not, and caches love them.7m
  5. BASICSBeginnerMembersFoundations - Recursion & the Call StackA function that calls itself sounds scary until you see the call stack - master base cases and you unlock trees, sorting, and DP.8m
  6. BASICSBeginnerMembersFoundations - Sets & Maps (Hash Intuition)Ask 'have I seen this before?' or 'what do I know about X?' in one step - hash sets and maps are the most-used tools in interviews.7m
  7. BASICSBeginnerMembersFoundations - Graphs & NetworksNodes and edges model everything from friendships to road maps - learn the vocabulary before touching graph algorithms.7m
  8. BASICSBeginnerMembersFoundations - Statistics Engineers Actually UseMean vs median, percentiles, and expected value - the numbers behind latency dashboards and 'why averages lie'.7m
  9. BASICSBeginnerMembersFoundations - Complexity Classes ComparedWatch every complexity class race real input sizes - and learn where the practical limits of computing actually sit.7m
  10. BASICSBeginnerMembersFoundations - Reading Code Traces on This SiteLearn to read the variable-table trace format used across this platform - pointers, highlights, and invariants in five minutes.6m

Patterns

syncing…
  1. PTRNBeginnerContinue →FreePattern - Two PointersOne array, two indices, O(n). The pattern behind Two Sum II, Valid Palindrome, Container With Most Water, and 3Sum.8m
  2. PTRNIntermediateFreePattern - Sliding WindowGrow a window right, shrink it left - O(n) instead of O(n^2). The pattern behind Longest Substring Without Repeating Characters and Minimum Window Substring.9m
  3. PTRNBeginnerMembersPattern - Fast & Slow PointersFloyd's tortoise and hare - detect linked-list cycles and find midpoints with O(1) space. Behind Linked List Cycle, Middle of List, and Happy Number.7m
  4. PTRNBeginnerMembersPattern - Prefix SumPrecompute running totals so any range sum is one subtraction. The pattern behind Range Sum Query, Subarray Sum Equals K, and Product Except Self.7m
  5. PTRNBeginnerMembersPattern - Hash Map for LookupsTrade memory for instant answers: have I seen this before? How many times? Where? Behind Two Sum, Contains Duplicate, Group Anagrams, and First Unique Character.7m
  6. PTRNIntermediateMembersPattern - Binary Search on the AnswerWhen brute-forcing the answer space is monotonic, binary search THE ANSWER itself. Behind Capacity to Ship Packages, Koko Eating Bananas, and Split Array Largest Sum.9m
  7. PTRNIntermediateMembersPattern - BFS & DFS TraversalTwo templates that visit every reachable node: BFS spreads level by level (shortest paths), DFS dives deep (structure and connectivity). Behind Number of Islands, Clone Graph, Word Ladder, Rotting Oranges.10m
  8. PTRNIntermediateMembersPattern - BacktrackingSystematically build candidates, undo dead ends, enumerate everything. Behind Subsets, Permutations, Combination Sum, N-Queens, and Word Search.9m
  9. PTRNIntermediateMembersPattern - Topological Sort (Kahn's Algorithm)Order tasks when prerequisites block them: repeatedly take nodes with zero unfinished dependencies. Behind Course Schedule II, Build Order, and Alien Dictionary.8m
  10. PTRNIntermediateMembersPattern - Monotonic StackNext greater/smaller element for everyone in O(n): keep the stack sorted by only popping smaller items. Behind Daily Temperatures, Next Greater Element, Largest Rectangle, and Trapping Rain Water.8m
  11. PTRNIntermediateMembersPattern - Dynamic Programming FrameworkStop memorizing DP problems. Define a state, write the transition, memoize or tabulate. Behind Climbing Stairs, House Robber, Coin Change, LIS, and Edit Distance.10m
  12. PTRNIntermediateMembersPattern - Heaps & Top-KKeep only the best K candidates in a size-K heap instead of sorting everything. Behind Top K Frequent, Kth Largest, K Closest Points, and Find Median from Data Stream.8m
  13. PTRNIntermediateMembersPattern - Intervals & GreedySort intervals, sweep once, decide locally. Behind Meeting Rooms, Merge/Insert Interval, Non-overlapping Intervals, and Interval Scheduling.8m
  14. PTRNIntermediateMembersPattern - Bit Manipulation TricksXOR cancels duplicates, n & (n-1) drops the lowest set bit, shifts multiply by two. Behind Single Number, Number of 1 Bits, Counting Bits, and Missing Number.8m

Data Structures

syncing…
  1. DSBeginnerContinue →FreeLinked List - Insert at HeadO(1) insertion. Allocate a node, rewire next, and move the head pointer.5m
  2. DSIntermediateFreeLRU CacheHash map for O(1) lookup plus a doubly linked list for recency order. Least-recently-used evicts first.9m
  3. DSBeginnerMembersValid ParenthesesCheck that every bracket is closed in the right order using a stack.6m
  4. DSBeginnerMembersMerge Two Sorted ListsMerge two sorted lists into one by always taking the smaller next node.7m
  5. DSBeginnerMembersReverse Linked ListReverse a linked list in place by rewiring each node's next pointer with three pointers.7m
  6. DSBeginnerMembersMaximum Depth of Binary TreeFind how deep a binary tree goes by computing subtree heights bottom-up.6m
  7. DSBeginnerMembersInvert Binary TreeMirror a binary tree by swapping each node's left and right children.6m
  8. DSIntermediateMembersValidate Binary Search TreeCheck a BST's ordering with an in-order walk or a value range.8m
  9. DSIntermediateMembersBinary Tree Level Order TraversalVisit a tree row by row using a queue - breadth-first search.7m
  10. DSBeginnerMembersLinked List CycleDetect a cycle in a linked list with Floyd's slow and fast pointers.7m
  11. DSAdvancedMembersBinary Tree Maximum Path SumFind the largest sum of any path in a binary tree with a post-order gain function.10m
  12. DSIntermediateMembersLowest Common Ancestor of a BSTFind the deepest node that has both targets as descendants using the BST order.8m
  13. DSAdvancedMembersSerialize and Deserialize Binary TreeEncode a tree to a string and rebuild it exactly, using pre-order with null markers.10m
  14. DSBeginnerMembersSame TreeCheck whether two binary trees are identical with a parallel recursive walk.6m
  15. DSIntermediateMembersData Structure - Heap & Priority QueueA binary heap gives O(1) access to the min/max and O(log n) insert - the engine behind top-k, schedulers, and Dijkstra.9m
  16. DSIntermediateMembersData Structure - Trie (Prefix Tree)Store words character by character so prefix lookups cost O(length), not O(dictionary size) - the engine of autocomplete.8m

Algorithms

syncing…
  1. ALGOIntermediateContinue →MembersConstruct Binary Tree from Preorder and Inorder TraversalPreorder's first element is always the root; an index map into inorder splits left/right subtrees in O(n).9m
  2. ALGOAdvancedMembersWord Search IIFind ALL dictionary words hidden in a grid: build a Trie of words, DFS once from every cell walking the Trie simultaneously.10m
  3. ALGOIntermediateMembersAdd and Search Word (Trie with wildcards)Trie supporting exact adds plus '.'-wildcard searches: same children map, but wildcard branches fan out via recursion.8m
  4. ALGOIntermediateMembersRotting OrangesMinutes until all oranges rot: multi-source BFS seeded with every rotten orange, spreading level by level.8m
  5. ALGOIntermediateMembersSum of Two IntegersAddition without '+' or '-': XOR adds carry-less, AND<<1 computes carries; iterate until no carry remains.7m
  6. ALGOBeginnerMembersMajority ElementFind the element appearing more than n/2 times in O(n) time and O(1) space with Boyer-Moore voting.6m
  7. ALGOIntermediateMembersReverse BitsMirror a 32-bit integer: peel bits off one end with shifts/masks and push them onto the other.7m
  8. ALGOIntermediateMembersSort Colors (Dutch National Flag)One pass, three pointers, zero swaps beyond necessity: the Dutch National Flag partition from Dijkstra.7m
  9. ALGOBeginnerMembersMove ZeroesShift all zeros to the end in place while preserving order: chasing-pointer write compaction.6m
  10. ALGOIntermediateMembersGraph Valid Treen nodes with exactly n-1 edges and full connectivity = tree. Union-Find detects cycles in near-O(n).7m
  11. ALGOIntermediateMembersNumber of Connected ComponentsCount disjoint friend circles in an undirected graph - Union-Find merging or BFS from every unvisited node.8m
  12. ALGOIntermediateMembersWord SearchDoes the grid contain a word via adjacent cells? DFS backtracking with in-place visited marking.8m
  13. ALGOIntermediateMembersPacific Atlantic Water FlowCells that drain to both oceans: reverse the flow - BFS/DFS inward FROM each ocean coast and intersect reach sets.9m
  14. ALGOIntermediateMembersKth Smallest Element in a BSTIn-order traversal of a BST visits values ascending - stop at the kth visit. O(h) with early exit via an iterator pattern.7m
  15. ALGOIntermediateMembersDesign HashMapBuild a hash map from scratch: fixed bucket array + chaining, with a hash function and load-factor resizing.8m
  16. ALGOIntermediateMembersSpiral MatrixTraverse an m x n matrix in spiral order with four shrinking boundaries - top, bottom, left, right.8m
  17. ALGOIntermediateMembersEncode and Decode StringsSerialize a list of strings into one string and back: length-prefix encoding survives any character content.7m
  18. ALGOIntermediateMembersLongest Palindromic SubstringExpand around each of the 2n-1 centers - simpler than DP tables and faster than Manacher for interviews.9m
  19. ALGOAdvancedMembersTrapping Rain WaterWater above bar i = min(maxLeft, maxRight) - height[i]. Two pointers compute it in one pass with O(1) space.10m
  20. ALGOIntermediateMembersMinimum Window SubstringSmallest substring of s containing every char of t (with repeats): sliding window + need/have counters.10m
  21. ALGOIntermediateMembersLongest Repeating Character ReplacementLongest window after flipping at most k chars: validity is (window length - max frequency) <= k.8m
  22. ALGOIntermediateMembersJump GameCan you reach the last index? Track the farthest reachable index greedily - no DP table needed.7m
  23. ALGOIntermediateMembersMaximum Product SubarrayProducts break standard Kadane: negatives flip sign and zeros reset - so track BOTH best and worst running products.8m
  24. ALGOIntermediateMembersLongest Common SubsequenceThe 2-D DP archetype: dp[i][j] over two strings, match-or-skip transitions. Gateway to Edit Distance and diff tools.9m
  25. ALGOIntermediateMembersHouse Robber IIHouses on a circle - first neighbors last. The trick: run linear House Robber twice, excluding one end each time.8m
  26. ALGOIntermediateMembersRemove Nth Node From End of ListOne pass with a lead gap: fast pointer runs n ahead, then both walk - slow stops exactly before the doomed node.7m
  27. ALGOIntermediateMembersReorder ListL0 -> Ln -> L1 -> Ln-1 in place: find middle, reverse second half, interleave. Three classic techniques in one problem.8m
  28. ALGOIntermediateMembersTask SchedulerCPU cooldowns between identical tasks: the answer hides in the most frequent task's frame, not in simulating.9m
  29. ALGOIntermediateMembersK Closest Points to OriginTop-K over distances without computing square roots: max-heap of size k on squared distance, or quickselect.7m
  30. ALGOAdvancedMembersMerge K Sorted Listsk-way merge with a size-k min-heap of list heads - always pop the global minimum. O(N log k).9m
  31. ALGOAdvancedMembersFind Median from Data StreamTwo balanced heaps partition the stream: max-heap below, min-heap above. Median reads off the roots in O(1).9m
  32. ALGOIntermediateMembersClone GraphDeep-copy a cyclic graph without infinite loops: a visited map turns cycles into plain memoized recursion.8m
  33. ALGOIntermediateMembersNon-overlapping IntervalsMinimum removals so intervals stop colliding: sort by end time, greedily keep earliest finishers.8m
  34. ALGOIntermediateMembersMin Stackpush/pop/min all O(1): cache the minimum at every stack depth so pops restore it automatically.7m
  35. ALGOIntermediateMembersKth Largest Element in an ArrayThree tiers: sort O(n log n), heap O(n log k), and quickselect O(n) average - know all three and their trade-offs.8m
  36. ALGOIntermediateMembersSearch in Rotated Sorted ArrayBinary search on a sorted array rotated at an unknown pivot - always land on the sorted half.9m
  37. ALGOIntermediateMembersContainer With Most WaterTwo lines, most water: converging pointers with a proof that discarding the shorter side is always safe.8m
  38. ALGOIntermediateMembersLongest Increasing SubsequenceO(n^2) DP with state dp[i] = LIS ending at i - then upgrade to O(n log n) with patience sorting on tails.9m
  39. ALGOIntermediateMembersCombination SumUnlimited coin reuse, enumerate every unique combo: backtracking with a start index and prune-on-overshoot.9m
  40. ALGOIntermediateMembersUnique PathsRobot walks m x n grid moving only right/down: 2-D DP where each cell inherits from top and left. Gateway to all grid DP.8m
  41. ALGOBeginnerFreeBinary SearchHalve the search space every step. Trace low, mid, and high as they converge on the target.6m
  42. ALGOBeginnerMembersBubble SortThe largest unsorted value bubbles to the end of each pass. Watch swaps happen in place.8m
  43. ALGOBeginnerFreeTwo SumFind two numbers that add up to a target. The single most-asked interview question.6m
  44. ALGOBeginnerMembersValid PalindromeCheck whether a string reads the same forward and backward with two pointers.5m
  45. ALGOBeginnerMembersValid AnagramDecide whether two strings are the same letters rearranged, by counting characters.5m
  46. ALGOBeginnerMembersContains DuplicateDetect whether an array has any repeated value using a hash set.4m
  47. ALGOBeginnerMembersBest Time to Buy and Sell StockFind the maximum profit from one buy and one sell by tracking the lowest price seen so far.6m
  48. ALGOIntermediateMembersMaximum SubarrayFind the contiguous subarray with the largest sum using Kadane's algorithm.8m
  49. ALGOIntermediateMembersNumber of IslandsCount connected land regions in a grid with a flood-fill DFS.9m
  50. ALGOBeginnerMembersClimbing StairsCount ways to climb n stairs taking 1 or 2 steps - the Fibonacci recurrence.7m
  51. ALGOIntermediateMembersHouse RobberMax money you can rob from a row of houses without hitting adjacent ones.8m
  52. ALGOIntermediateMembers3SumFind all triplets that sum to zero using sort plus two pointers.10m
  53. ALGOIntermediateMembersProduct of Array Except SelfReturn the product of every element except the current one, without division.8m
  54. ALGOIntermediateMembersCoin ChangeFind the fewest coins that make a target amount with unbounded denominations.10m
  55. ALGOIntermediateMembersGroup AnagramsGroup words that are anagrams using a sorted string as the key.8m
  56. ALGOIntermediateMembersLongest Substring Without Repeating CharactersFind the longest substring with all distinct characters using a sliding window.8m
  57. ALGOIntermediateMembersTop K Frequent ElementsReturn the k most common values using bucket sort by frequency.8m
  58. ALGOIntermediateMembersWord BreakDecide if a string can be split into dictionary words with DP.10m
  59. ALGOIntermediateMembersDecode WaysCount how many ways a digit string can decode into letters with a Fibonacci-style DP.9m
  60. ALGOIntermediateMembersCourse ScheduleDecide if all courses can be taken by detecting a cycle with Kahn's topological sort.10m
  61. ALGOBeginnerMembersNumber of 1 BitsCount set bits in an integer by clearing the lowest 1 with n & (n - 1).6m
  62. ALGOBeginnerMembersMissing NumberFind the missing number from 0..n using the sum formula or XOR.6m
  63. ALGOIntermediateMembersRotate ImageRotate an n x n matrix 90 degrees clockwise in place via transpose and reverse.8m
  64. ALGOIntermediateMembersMerge IntervalsMerge overlapping intervals by sorting on start, then fusing overlaps in one pass.8m
  65. ALGOIntermediateMembersInsert IntervalInsert a new interval into a sorted non-overlapping list and merge any overlaps.8m
  66. ALGOBeginnerMembersMeeting RoomsDecide if one person can attend all meetings by checking sorted intervals for overlaps.6m
  67. ALGOIntermediateMembersAlgorithm - Union-Find (Disjoint Set Union)Track which items belong to the same group in near-constant time - the secret weapon behind cycle detection and connected components.8m
  68. ALGOAdvancedMembersAlgorithm - Dijkstra's Shortest PathGreedy + priority queue settles the closest unfinalized node each round - shortest paths for any graph with non-negative weights.10m
  69. ALGOBeginnerMembersAlgorithm - Merge SortDivide in half, sort recursively, merge linearly - the stable O(n log n) guarantee and the gateway to external sorting.7m
  70. ALGOBeginnerMembersAlgorithm - Quick SortPartition around a pivot and recurse - the fastest in-memory sort in practice, with an O(n²) worst case you must know how to avoid.8m

System Design

syncing…
  1. SYSAdvancedContinue →MembersConsistent HashingDistribute keys across servers so adding or removing a node moves only ~1/n of keys - the backbone of sharding.10m
  2. SYSAdvancedMembersTypeahead / Search SuggestionsInstant suggestions as you type: precomputed top-K per prefix served from RAM, refreshed asynchronously from search logs.10m
  3. SYSAdvancedMembersVideo Streaming Service (YouTube/Netflix)Upload pipeline transcodes into multi-bitrate chunks; CDN edge servers stream via adaptive bitrate (HLS/DASH).12m
  4. SYSAdvancedMembersRide-Sharing Service (Uber/Lyft)Geospatial matching at scale: geohash grid buckets for driver discovery, websocket presence, and state-machine trips.11m
  5. SYSAdvancedMembersDistributed File Storage (Google Drive/Dropbox)Chunk files into 4MB blocks, dedupe by content hash, sync via metadata-only delta uploads - block storage beats file storage.11m
  6. SYSAdvancedMembersTicket Booking System (Ticketmaster)Scarcity under thundering herds: virtual waiting rooms, seat holds with TTLs, and atomic inventory commits.10m
  7. SYSAdvancedMembersPhoto Sharing Service (Instagram Feed)Media pipeline + fan-out-on-write for normal users and fan-out-on-read for celebrities - the hybrid feed classic.10m
  8. SYSAdvancedMembersSearch Index (Inverted Index)Map words -> document lists, shard across machines, merge ranked results - how Elasticsearch/web search actually work.10m
  9. SYSIntermediateFreeSystem Design - URL ShortenerA short URL service end to end: short-code generation, storage, caching, and redirects.7m
  10. SYSBeginnerMembersSystem Design - How DNS WorksTurn a name into an IP: recursive resolution from the resolver to the root, TLD, and authoritative servers.6m
  11. SYSIntermediateFreeSystem Design - CachingServe hot data from memory and pick the write strategy that matches your risk tolerance.9m
  12. SYSIntermediateMembersSystem Design - CAP TheoremA distributed system can guarantee only two of three: consistency, availability, and partition tolerance.7m
  13. SYSIntermediateMembersSystem Design - SQL vs NoSQLPick the store that fits the data shape: relational for joins and ACID, NoSQL for scale and flexibility.8m
  14. SYSAdvancedMembersSystem Design - Scaling to Millions on AWSGrow a system from one box to millions of users by removing the bottleneck at each step.12m
  15. SYSAdvancedMembersSystem Design - Twitter Timeline and SearchPost a tweet, fan it out to follower timelines, serve reads from cache, and search an index.12m
  16. SYSIntermediateMembersSystem Design - Content Delivery NetworkServe content from servers near the user so it loads fast anywhere in the world.8m
  17. SYSIntermediateMembersSystem Design - Load BalancerSpread traffic across servers so no single machine is overwhelmed, and hide failures.8m
  18. SYSIntermediateMembersSystem Design - Reverse ProxyA server that sits in front of your backend, forwards requests, and shields it from clients.7m
  19. SYSIntermediateMembersSystem Design - Application Layer and MicroservicesSplit an app into small independent services, each owning one job and its own data.9m
  20. SYSAdvancedMembersSystem Design - Database ScalingKeep the database fast as it grows: replication, federation, sharding, and denormalization.11m
  21. SYSIntermediateMembersSystem Design - Consistency PatternsWeak, eventual, or strong: how fresh a read is, and what you pay for it.8m
  22. SYSIntermediateMembersSystem Design - Availability PatternsFailover and replication keep a system up - and the nines measure how well.8m
  23. SYSIntermediateMembersSystem Design - Asynchronism and QueuesDo slow work later, off the request path, so the user is never kept waiting.8m
  24. SYSIntermediateMembersSystem Design - Communication ProtocolsHow services talk: TCP vs UDP underneath, and RPC vs REST on top.9m
  25. SYSIntermediateMembersSystem Design - Security and TLSTLS encrypts traffic end to end: a handshake exchanges keys, then symmetric crypto seals the stream.7m
  26. SYSAdvancedMembersSystem Design - Web CrawlerDownload the web page by page: a frontier queue, polite fetching, dedup, and an index.12m
  27. SYSIntermediateMembersSystem Design - Personal Finance AggregatorPull transactions from many banks, normalize them, and categorize spending.10m
  28. SYSAdvancedMembersSystem Design - Social GraphModel users and follows as a graph, then traverse it for suggestions and feeds.10m
  29. SYSAdvancedMembersSystem Design - Key-Value StoreConsistent hashing maps keys to shards so adding a node moves few keys, with quorums for consistency.11m
  30. SYSAdvancedMembersSystem Design - Sales RankingTurn a stream of orders into a live bestseller list with incremental counters and a top-N computation.10m
  31. SYSIntermediateMembersOO Design - Parking LotModel a parking lot: levels, spots, vehicles, and tickets, with O(1) spot lookup.9m
  32. SYSBeginnerMembersOO Design - Deck of CardsModel cards, a deck, hands, and a game - and shuffle correctly with Fisher-Yates.7m
  33. SYSIntermediateMembersOO Design - Call CenterRoute calls to the first available employee, then escalate up the chain of command.8m
  34. SYSAdvancedMembersOO Design - Online ChatModel users, conversations, and messages, with fan-out delivery and presence tracking.9m
  35. SYSIntermediateMembersSystem Design - Back-of-Envelope EstimationEstimate QPS, storage, and latency in your head to sanity-check any design before building.8m
  36. SYSIntermediateMembersSystem Design - Rate LimiterReject excess traffic with counters and windows - fixed, sliding, and token-bucket strategies compared.9m
  37. SYSIntermediateMembersSystem Design - Distributed Message QueueDecouple producers from consumers with a durable log - offsets, delivery guarantees, and ordering trade-offs.10m
  38. SYSIntermediateMembersSystem Design - Proximity Service (Geo-Indexing)Find everything nearby at city scale - geohash grids, cell rings, and the write-heavy reality of moving objects.10m
  39. SYSAdvancedMembersSystem Design - Undo/Redo & Collaborative EditingCommand stacks for solo undo, then OT and CRDT strategies when many cursors edit one document at once.10m
  40. SYSIntermediateMembersSystem Design - Notification SystemFan one event out to millions across push, email, and in-app - with preferences, dedupe, and rate caps at every hop.9m