120 problems, two languages, one habit worth building
Not a full course — a warm-up, front-loaded and then some. It starts with classic beginner problems on strings, numbers, lists, loops and functions, then climbs through objects, sorting algorithms, closures, promises vs. Python's asyncio, array-method polyfills, and the classic interview algorithms (Two Sum, sliding windows, and more). Every problem is solved and explained twice: once in JavaScript, once in Python, with comments that walk through every line. Read the same idea in both languages side by side and the syntax stops being the hard part — the logic does.
What you need & what this is for
What you should already know
- Basic syntax in at least one language — variables, if/else, and a for or while loop
- No algorithms background required for Modules 1–7; every solution is explained from first principles
- Modules 8–12 climb toward interview level (sorting algorithms, closures, async, classic algorithms) — comfortable after Modules 1–7, or if you've already got the basics down
- Pairs well with the Python or JavaScript & TypeScript courses, but stands entirely on its own
- Modules 8 and 12 overlap with DSA in C++ — useful as direct interview-prep alongside it
How to use this page
Every problem is a collapsible card: read the prompt, think it through yourself first, then expand it for the approach and both solutions.
Twelve modules, ten problems each
All 120 problems are live right now — nothing here is "coming soon." Modules 1–7 are foundations; 8–12 climb toward interview level. Work through them in order, or jump straight to the topic you want to drill.
Strings
Reversing, scanning and rebuilding text one character at a time.
- Reverse a string, palindrome checks & anagram checks
- Character-frequency counting & the first non-repeating character
- Whitespace stripping, title-casing & finding the longest word
Numbers & Numerics
Classic number-theory drills: the ones that show up in every first coding interview.
- Prime checks, numeric palindromes & Armstrong numbers
- Factorial & Fibonacci, computed iteratively
- GCD, LCM, digit reversal, perfect numbers & digit sums
Lists & Sequences
The array operations underneath almost every real-world data-processing task.
- Max/min, sum/average & the second-largest element
- Removing duplicates, reversing in place & checking if sorted
- Merging sorted lists, intersections & rotating a list
Loops, Conditionals & Control Flow
Turning "repeat this" and "decide that" into working programs.
- FizzBuzz, star & number patterns, and multiplication tables
- Sieving primes up to n & counting evens/odds in a range
- Largest-of-three, leap-year rules & digit counting
Functions, Recursion & Logic
Where the earlier iterative solutions get a recursive twin, plus a few interview staples.
- Factorial, Fibonacci & list-summing, all done recursively
- Binary & linear search, and variadic-argument functions
- Balanced parentheses, decimal-to-binary & a calculator function
JavaScript Array Methods & Collections
The functional Array methods JS developers reach for daily, matched against their closest Python idiom.
map,filter&reduce, plus chaining them into one pipelinefind,some/every,forEach& sorting with a comparatorSetfor dedup andMapfor keyed data, compared to Python'sset&dict
Objects & Dictionaries
Everything Modules 1–3 did with strings and lists, now applied to key-value data.
- Reverse keys/values, count and search properties by value
- Shallow vs. deep clone, merging objects, converting to/from arrays
- Group a list of records by a shared property, sort entries by value
Sorting & Searching Algorithms
Six classic sorts and four binary-search variants, built from scratch.
- Bubble, selection, insertion, merge, quick & counting sort
- First/last occurrence in a sorted array using binary search
- Search a rotated sorted array & find a peak element
Closures & Function Composition
The frontend-interview toolkit: counters, private state, currying, debounce and more.
- Counters, private bank-account state & function currying
once,memoize,debounce&throttleretry,pipe/compose& partial application
Promises (JS) & Asyncio (Python)
The one module where the two languages genuinely diverge — matched function for function.
- Sleep, sequential vs. parallel execution & racing tasks
Promise.all/allSettledvs.asyncio.gather- Timeouts, retries & limiting concurrency with a semaphore
Implement Your Own Array Methods
Module 6's built-ins, opened up and rebuilt from a plain loop — a classic interview ask.
- Your own
map,filter,reduce&forEach - Your own
find,some/every,includes/indexOf - Your own
flat& a comparator-basedsort
Advanced Array & String Algorithms
Ten classic interview problems, built from techniques earned in every module before this one.
- Two Sum, Three Sum & Kadane's maximum subarray
- Product except self, merge intervals & group anagrams
- Longest substring without repeats & container with most water