DSA Trainer
5 free · 47 premium

Recognize the pattern. Not just the solution.

The skill that breaks people in real interviews is not solving the problem. It is recognizing which pattern to reach for when nothing is labeled. Each drill shows you a problem description with the labels removed. Your job: identify the pattern.

Problems are reframed in real-world contexts so you cannot just pattern-match on the LeetCode prompt you have seen before.

Start a free session5 or 10 shuffled problems · score card at the end
B
Big_Wolverine_7575Founding Member· unprompted on Reddit

“This app finally made it click. I tried NeetCode, CTCI, and YouTube for years and still could not solve Two Sum. The beginner mental models for the patterns are genuinely so helpful. THANK YOU.

Individual drills(5 accessible)

Unlock all 52
Drill #1Free

You're building an expense-splitting app.

ArraysEasy
Start drill
Drill #2Free

A code formatter needs to verify that all grouping symbols in a line are correctly nested and closed.

StringsEasy
Start drill
Drill #3Free

A warehouse stores products in sorted order by SKU number.

ArraysEasy
Start drill
Drill #4Free

An event ticketing platform receives a batch of ticket IDs for validation.

ArraysEasy
Start drill
Drill #5Free

A number transformation game repeatedly replaces a number with the sum of the squares of its digits.

MathEasy
Start drill
Drill #6Premium

A data pipeline receives an unsorted stream of numeric IDs from various sources.

ArraysMedium
Unlock with Premium
Drill #7Premium

A word-game engine needs to verify that a scrambled word is a valid rearrangement of a target word, same letters, just shuffled.

StringsEasy
Unlock with Premium
Drill #8Premium

You're checking whether a message can be assembled by cutting individual letters from a source document, each letter from the source can only be used once.

StringsEasy
Unlock with Premium
Drill #9Premium

A live-chat app highlights the first character a user types that they haven't typed before in that session.

StringsEasy
Unlock with Premium
Drill #10Premium

A search engine wants to cluster queries that are rearrangements of the same letters so it can serve unified results for all of them.

StringsMedium
Unlock with Premium
Drill #11Premium

A music streaming platform wants to surface the k most-played songs this week.

ArraysMedium
Unlock with Premium
Drill #12Premium

A social platform lets users set custom display names and flags any name that reads the same forwards and backwards (after stripping punctuation and spaces) as a 'mirror name'.

StringsEasy
Unlock with Premium
Drill #13Premium

A photo management app stores image IDs in an array and uses 0 as a placeholder for deleted slots.

ArraysEasy
Unlock with Premium
Drill #14Premium

A sensor array records calibration offsets in sorted order, including negative values.

ArraysEasy
Unlock with Premium
Drill #15Premium

A price comparison tool scans a sorted catalog and needs to find two items whose prices add up to exactly a customer's budget.

ArraysMedium
Unlock with Premium
Drill #16Premium

A civil engineering simulator models water retention between pairs of levee walls built at evenly spaced positions.

ArraysMedium
Unlock with Premium
Drill #17Premium

A chemistry simulator finds all unique combinations of three signed concentration values that balance to zero, meaning their sum is exactly 0.

ArraysMedium
Unlock with Premium
Drill #18Premium

A fitness tracker calculates your best stretch for goal-setting.

ArraysEasy
Unlock with Premium
Drill #19Premium

A delivery scheduler needs the shortest consecutive stretch of route legs that meets a minimum total distance requirement.

ArraysMedium
Unlock with Premium
Drill #20Premium

A plagiarism detector checks whether any scrambled version of a short source phrase appears anywhere inside a longer document.

StringsMedium
Unlock with Premium
Drill #21Premium

A session token generator scores candidate strings by the length of their longest run of unique characters, higher is more random.

StringsMedium
Unlock with Premium
Drill #22Premium

A genomics tool checks whether a target gene sequence, or any scrambled arrangement of it, appears anywhere inside a longer genome strand.

StringsMedium
Unlock with Premium
Drill #23Premium

A restocking truck travels a fixed route of supply depots, each stocked with a single product type.

ArraysMedium
Unlock with Premium
Drill #24Premium

A youth baseball app processes a scorebook that uses four entry types: an integer adds a direct score, '+' adds the sum of the last two scores, 'D' doubles the most recent score, and 'C' cancels the most recent score.

SimulationEasy
Unlock with Premium
Drill #25Premium

Design an undo-history manager for a text editor.

DesignMedium
Unlock with Premium
Drill #26Premium

A weather alert app tells users how many days they need to wait before the next warmer day arrives.

ArraysMedium
Unlock with Premium
Drill #27Premium

A robotic inventory system processes pick-and-pack instructions as a stream of tokens.

SimulationMedium
Unlock with Premium
Drill #28Premium

A city zoning system calculates the largest solid rectangular billboard that could be mounted flush against a block of buildings, spanning one or more consecutive buildings.

ArraysHard
Unlock with Premium
Drill #29Premium

A trading platform pre-computes 'next breakthrough' prices: for each price in a reference feed, the next price that appears later in the feed and is strictly higher.

ArraysEasy
Unlock with Premium
Drill #30Premium

Sensors on a circular race track record lap speeds at fixed positions.

ArraysMedium
Unlock with Premium
Drill #31Premium

A financial analytics service streams a market indicator's daily readings one at a time.

DesignMedium
Unlock with Premium
Drill #32Premium

A leaderboard keeps scores in ascending order.

ArraysEasy
Unlock with Premium
Drill #33Premium

A CI pipeline manages thousands of build versions.

ArraysEasy
Unlock with Premium
Drill #34Premium

A sorted sensor calibration table was accidentally rotated at an unknown pivot point during a data migration.

ArraysMedium
Unlock with Premium
Drill #35Premium

A factory must clear a backlog of production batches before a fixed deadline.

ArraysMedium
Unlock with Premium
Drill #36Premium

A satellite telemetry archive stores readings sorted by timestamp, but a transmission gap caused the feed to wrap: recent readings were prepended in front of older ones, rotating the sequence at an unknown point.

ArraysMedium
Unlock with Premium
Drill #37Premium

Two customer service queues, each already sorted by wait time, need to be merged into a single sorted queue.

Linked ListsEasy
Unlock with Premium
Drill #38Premium

A browser keeps its page history as a linked list where each node points to the next page visited.

Linked ListsEasy
Unlock with Premium
Drill #39Premium

A task runner chains jobs via 'next job' pointers.

Linked ListsEasy
Unlock with Premium
Drill #40Premium

A podcast player needs to bookmark the midpoint episode in a playlist stored as a linked list, without first counting all episodes.

Linked ListsEasy
Unlock with Premium
Drill #41Premium

A financial analyst reviews a daily profit/loss log for a trading strategy.

ArraysMedium
Unlock with Premium
Drill #42Premium

A quant strategy tracks daily return multipliers for a portfolio.

ArraysMedium
Unlock with Premium
Drill #43Premium

A trading bot backtests a simple one-trade strategy on historical prices.

ArraysEasy
Unlock with Premium
Drill #44Premium

A UI framework renders tree-based layouts and needs a 'mirror' operation that flips the entire tree left-to-right.

TreesEasy
Unlock with Premium
Drill #45Premium

A company stores its org chart as a binary tree where each node is an employee.

TreesEasy
Unlock with Premium
Drill #46Premium

A paint bucket tool in a graphics editor fills a contiguous region of the same color starting from a clicked pixel.

ArraysEasy
Unlock with Premium
Drill #47Premium

A geographic mapping tool receives a satellite grid where each cell is either land or water.

ArraysMedium
Unlock with Premium
Drill #48Premium

The same geographic mapping tool needs to report the size of the largest landmass in the grid rather than just the count.

ArraysMedium
Unlock with Premium
Drill #49Premium

A fitness tracking app counts the number of distinct step patterns a user can take to reach the top of a staircase.

ArraysEasy
Unlock with Premium
Drill #50Premium

A logistics optimizer plans delivery stops along a route but has a constraint: two adjacent stops cannot both be selected (they'd conflict with each other's time windows).

ArraysMedium
Unlock with Premium
Drill #51Premium

A vending machine controller selects the fewest coins to return as change, given available denominations and an infinite supply of each.

ArraysMedium
Unlock with Premium
Drill #52Premium

A backup verification system checks whether two filesystem snapshots are identical, same structure and same values at every corresponding node.

TreesEasy
Unlock with Premium
Full access · both courses

Unlock all 47 remaining drills

Also includes both full courses, DSA and System Design, with concept lessons, graded tests, and cold-read capstones, plus all 150 guided problems with hint ladders and a C++, JS, and Python runner.

$49.99per year or $9.99/moLeetCode Premium is $159/year.

Cancel anytime. Not useful within 7 days? Email for a full refund. Secured by Stripe.