Practice. Ship. Repeat.
Hand-picked problems across 6 languages — banking, e-commerce, analytics, system design. Run them right in your browser; ask AI when stuck.
Hello, World!
Write a program that prints exactly: Hello, World!
Sum of Two Numbers
Write a function `sum(a, b)` that returns the sum of a and b. Call sum(2, 3) and log the result.
FizzBuzz 1–15
Print numbers 1 to 15. Replace multiples of 3 with 'Fizz', multiples of 5 with 'Buzz', and multiples of both with 'FizzBuzz'.
Reverse a String
Write a function reverse(s) that returns the reverse of a string. Log reverse('codekilla').
Factorial
Write a function factorial(n) that returns n! using recursion. Log factorial(5).
Is Palindrome?
Write isPalindrome(s) that returns true if s reads the same backwards. Log isPalindrome('level') and isPalindrome('hello').
Fibonacci Sequence
Print the first 10 Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34).
Find Maximum in Array
Given an array [3, 7, 2, 9, 5], find and print the maximum value without using Math.max.
Two Sum (Banking)
You're auditing a set of transaction amounts and need to find two transactions that together reconcile to exactly `target`. Return the 0-based indices of the two transactions. Exactly one solution exists.
Reverse a String
Reverse a given string without using Python's built-in slice `[::-1]` — demonstrate the two-pointer technique.
Group E-Commerce Orders by Customer
You're given `n` order lines from an online store. Each line has a customer ID and an amount. Compute the total revenue per customer and print customers in ascending order of ID.
Longest Substring Without Repeating
Given a string, return the length of the longest substring with all distinct characters. Classic sliding-window problem.
Build an LRU Cache
Implement an LRU (Least Recently Used) cache with O(1) `get` and `put`. Used by every web browser, CDN, and database query planner.
FizzBuzz (Marketing Dashboard)
Print 1..n. Replace multiples of 3 with 'Fizz', multiples of 5 with 'Buzz', both with 'FizzBuzz'.
Implement Debounce
Write `debounce(fn, ms)` that returns a function which, when called repeatedly, will fire `fn` only once `ms` milliseconds have passed since the last call. This is the pattern behind 'search-as-you-type' that doesn't hammer the server.
Flatten Nested Array to Depth N
Implement `flat(arr, depth)` without using the built-in `Array.prototype.flat`.
Implement Promise.all
Write `myAll(promises)` that returns a promise resolving to the array of results in input order, OR rejects with the first rejection. Without using Promise.all.
Build an EventEmitter
Implement a Node-style EventEmitter with `on`, `off`, `emit`, and `once`. Foundation of every pub/sub system.
Max Subarray Sum (Stock Analytics)
Given daily profit/loss numbers for a stock, find the maximum total profit over any contiguous window of days (Kadane's algorithm — a trading interview classic).
Group Anagrams
Given a list of words, group them into anagram families. Any ordering is acceptable.
Valid Parentheses
Given a string of brackets `()[]{}`, return `true` if every opener has a matching closer in the correct order.
Coin Change (Minimum Coins)
Given coin denominations and an amount, return the fewest coins needed, or -1 if impossible.
Serialize a Binary Tree
Serialize a binary tree to a string and deserialize it back. A classic system-design interview question — how would you transmit a tree over a network? Use level-order with `null` sentinels.
Sum of an Array (Inventory)
You run a small shop. Given N daily sales figures, compute the total revenue for the week.
