All · Practice · Algorithms and data structures

Core Patterns 40

Forty coding problems covering the patterns big-tech interviews test, in Python or JavaScript.

  • Free
  • Beginner to intermediate
  • 13h
  • 40 problems

What you’ll learn

  • Recognise which pattern a coding problem calls for
  • Move from a brute force to the efficient solution and state its time and space
  • Handle edge cases that hidden tests check: empty input, duplicates, negatives, large sizes
  • Write working Python or JavaScript under interview conditions

About this course

The problems follow the usual order for learning the patterns, from arrays and hashing to graphs and dynamic programming. Each one has a clear statement, examples, constraints and starter code in Python and JavaScript.

How it works: Run checks your code on the visible examples and shows what your function returned. Submit runs it on every test, including hidden edge cases and a large input where the problem expects better than a brute force. Hints build up one at a time, and the worked solution explains the pattern, why it works, the common mistake and the time and space it needs.

Code runs in your browser, so nothing is installed and nothing leaves your device until you submit your result.

Syllabus

17 units, about 13 hours.

1Arrays and hashing3 lessons40m
  • Pair With Target Sum
  • First Badge Scanned Twice
  • Same-Shape Word Pairs
2Two pointers3 lessons55m
  • Gift and Card Combos
  • Pair Gloves Within Tolerance
  • Compare Run-Length Notes
3Sliding window2 lessons35m
  • Brightest Reading Window
  • Shortest Playlist With Every Genre
4Prefix sums2 lessons37m
  • Loud Readings in Ranges
  • Balanced Shift Segments
5Stacks2 lessons37m
  • Nested Task Log Check
  • Lighthouse Beam Coverage
6Binary search2 lessons40m
  • Products in a Price Band
  • Raise the Lowest Plot
7Sorting and intervals4 lessons1h 25m
  • Parcel Dispatch Order
  • Studio Idle Gaps
  • Busiest Moment on the Switchboard
  • Count Race Overtakes
8Strings1 lesson25m
  • Parse a Key-Value Log Line
9Linked lists2 lessons30m
  • Thin Out the Chain
  • Flip Every Other Block
10Trees3 lessons40m
  • Deepest Branch
  • Trails Within Budget
  • Hops Between Two Badges
11Binary search trees2 lessons30m
  • Balanced Index From Sorted IDs
  • Is the Catalogue Ordered?
12Tries2 lessons43m
  • Autocomplete Counter
  • Strongest Signal Pair
13Heaps and greedy2 lessons35m
  • Leaderboard Cutoff
  • Cheapest Way to Combine Logs
14Graphs4 lessons1h 32m
  • Farthest From a Charger
  • Groups After Each Cable
  • Recipe Step Order
  • One Free Road
15Backtracking2 lessons40m
  • Seating Without Rivals
  • Rising Number Splits
16Dynamic programming2 lessons53m
  • Stall Days Without Burnout
  • Courier Routes With Few Turns
17Bit manipulation and design2 lessons47m
  • Light Every Lamp
  • Recently Used Shelf

Who it’s for

All, at Beginner to intermediate level.

Time needed

Self-paced, with no start dates or deadlines. Working through everything takes about 13 hours in total; the syllabus shows the time for each unit.

More like this

Related courses

All Practice courses
Practice

All · SQL

SQL 20

Twenty original SQL problems in the style data, analytics and engineering interviews use: NULLs, anti-joins, aggregation, top-N per group with ties, running totals, month-over-month change, deduplication, pivots and gaps-and-islands streaks. You write the query in the browser and it is checked against hidden data sets, so it has to be right for edge cases, not just the sample.

  • Beginner to advanced
  • 5h
  • 20 problems
  • Practice
Free
Practice

All · Puzzles

Logic and Probability Puzzles 30

Thirty original puzzles: weighing and deduction, switches and lamps, dice and card games, expected waiting times, optimal stopping, Fermi estimates and mental maths. Quant trading firms, analytics teams and consulting interviews use puzzles like these to see how you reason. Give your answer as a number, fraction or choice, then read the worked solution.

  • Beginner to advanced
  • 4h
  • 30 problems
  • Practice
Free