Module 08 · DSA · Worked problems, in English · about 28 min to read
Continue where you left off ×
The Practice Ladders
Pattern Recognition · Open board
The table at the bottom of this drawing sorts an unseen problem into a shape by the words in its ask. This lesson hands you three problems for each of those shapes, so the table becomes something you have used rather than something you have read.
Before you start. Interview Patterns (recognize the shape, apply the template) gave you the idea this page leans on: a pattern is a problem shape that keeps coming back with a solution you can reuse, and a tell is the handful of words in a problem statement that give the shape away (“sorted array” and “a pair” mean two pointers). Here you practise spotting tells, one pattern at a time, on real LeetCode problems.
The idea in 30 seconds
A pattern is a named problem shape, and a tell is the words in the statement that give it away.
Chess masters out-remembered weaker players on real positions and lost most of that edge on random ones: naming shapes, not counting problems, is what transfers.
A ladder is one easy done cold, one medium in a twenty-minute box, and an optional hard.
Open the hint only after twenty minutes, and after each rung write “I knew it was X because Y”.
Read the story
Lesson 75 of 96 in DSA
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson 1946, Amsterdam: the chess master’s five-second glance The ladder: three rungs, one pattern Why twenty minutes, and why the hint is folded The one line that makes a rung count Arrays and hashing Two pointers Sliding window Stack and monotonic stack Binary search on an index Binary search on the answer Linked lists and fast/slow pointers Trees Tries Heaps and top-k Backtracking Graphs: BFS, DFS and topological sort Shortest paths Union-find Intervals Greedy 1-D dynamic programming 2-D dynamic programming Bits and math Review DSA
Connects to
Complexity & Big-O DSA Arrays & Strings DSA Hashing DSA Linked Lists, Stacks & Queues DSA Trees (BST, balancing, heaps, tries) DSA Graphs (BFS, DFS, Dijkstra, topological sort) DSA Sorting & Searching DSA Recursion & Dynamic Programming DSA Algorithm Design Patterns DSA Capstone: Attack an Unseen Problem DSA Dynamic Programming, Worked (filling the table) DSA Shortest Paths, Worked (Dijkstra, Bellman-Ford, A*) DSA Interview Patterns (recognize the shape, apply the template) DSA String Algorithms (finding the needle) DSA Trees, Worked (rotations, B-trees, range trees) DSA Bit Manipulation (thinking in bits) DSA Clinic #01: Reverse a Linked List DSA Clinic #02: Climbing Stairs DSA Clinic #03: Coin Change DSA Clinic #04: Meeting Rooms II DSA Clinic #05: Two Sum DSA Clinic #06: Longest Substring Without Repeating Characters DSA Clinic #07: Valid Parentheses DSA Clinic #08: Daily Temperatures DSA Clinic #09: Maximum Depth of Binary Tree DSA Clinic #10: Diameter of Binary Tree DSA Clinic #11: Binary Search DSA Clinic #12: Search in Rotated Sorted Array DSA Clinic #13: Subsets DSA Clinic #14: Combination Sum DSA Clinic #15: Number of Islands DSA Clinic #16: Course Schedule DSA Clinic #17: Container With Most Water DSA Clinic #18 - 3Sum DSA Clinic #19: Kth Largest Element in an Array DSA Clinic #20: Top K Frequent Elements DSA Clinic #21: Unique Paths DSA Clinic #22: Longest Common Subsequence DSA Clinic #23: Implement Trie DSA Clinic #24: Word Search II DSA Clinic #25: Network Delay Time DSA Clinic #26: Redundant Connection DSA Clinic #27: Jump Game DSA Clinic #28: Merge Intervals DSA Clinic #29: Non-overlapping Intervals DSA Clinic #30: Rotate Image DSA Clinic #31: Pow(x, n) DSA Clinic #32: Single Number DSA Clinic #33: Koko Eating Bananas DSA Clinic #34: Linked List Cycle DSA Mark as read Saved in this browser, and to your account when you sign in.