Problems
19 problems
- 01Maps & sets
First unpaired event
Normalize event keys and find the first key that occurs exactly once.
- 02Parsing
One-pass string parser
Read a small expression one character at a time. Extend your parser as each part unlocks.
- 03Caching
Expiring key-value store
Implement overwrite, deletion and exact TTL boundaries with explicit logical time.
- 04Caching
Bounded LRU cache
Maintain recency, update existing entries and evict the least recently used key.
- 05Maps & sets
Pair-sum indices
Find the first completing pair with deterministic index selection.
- 06Arrays
Merge sorted sequences
Merge two ordered arrays while preserving every duplicate.
- 07Strings
Longest distinct substring
Track a contiguous window with no repeated characters.
- 08Search & sorting
First target index
Use binary search to find the first occurrence in a sorted array.
- 09Arrays
Range sum queries
Answer repeated range sums with one prefix pass.
- 10Maps & sets
Anagram groups
Group words by character counts while preserving first-seen order.
- 11Arrays
Sorted deduplication
Scan a sorted sequence and return each distinct value once.
- 12Stacks
Balanced delimiters
Use a stack to check matching delimiters and nesting order.
- 13Intervals
Merge overlapping intervals
Sort ranges and merge overlapping or touching closed intervals.
- 14Trees & graphs
Tree depth
Find the longest root-to-leaf path in a binary tree.
- 15Trees & graphs
Dependency cycle detection
Detect cycles across every component of a directed dependency graph.
- 16Queues & scheduling
Retrying job queue
Reserve FIFO work, retry safely and reject stale acknowledgements without losing capacity.
- 17Concurrency reasoning
Bounded worker scheduling
Keep worker capacity, FIFO admission and cancellation correct as events overlap.
- 18Networking
Framed message decoder
Recover complete binary messages from split reads without losing an incomplete tail.
- 19State & dependencies
Task registry
Build a task registry, then extend it as new requirements unlock.