Beyond Big O

Problems

19 problems

  1. 01
    Maps & sets

    First unpaired event

    Normalize event keys and find the first key that occurs exactly once.

    EasyLoading…
  2. 02
    Parsing

    One-pass string parser

    Read a small expression one character at a time. Extend your parser as each part unlocks.

    MediumLoading…
  3. 03
    Caching

    Expiring key-value store

    Implement overwrite, deletion and exact TTL boundaries with explicit logical time.

    MediumLoading…
  4. 04
    Caching

    Bounded LRU cache

    Maintain recency, update existing entries and evict the least recently used key.

    MediumLoading…
  5. 05
    Maps & sets

    Pair-sum indices

    Find the first completing pair with deterministic index selection.

    EasyLoading…
  6. 06
    Arrays

    Merge sorted sequences

    Merge two ordered arrays while preserving every duplicate.

    EasyLoading…
  7. 07
    Strings

    Longest distinct substring

    Track a contiguous window with no repeated characters.

    MediumLoading…
  8. 08
    Search & sorting

    First target index

    Use binary search to find the first occurrence in a sorted array.

    EasyLoading…
  9. 09
    Arrays

    Range sum queries

    Answer repeated range sums with one prefix pass.

    EasyLoading…
  10. 10
    Maps & sets

    Anagram groups

    Group words by character counts while preserving first-seen order.

    MediumLoading…
  11. 11
    Arrays

    Sorted deduplication

    Scan a sorted sequence and return each distinct value once.

    EasyLoading…
  12. 12
    Stacks

    Balanced delimiters

    Use a stack to check matching delimiters and nesting order.

    EasyLoading…
  13. 13
    Intervals

    Merge overlapping intervals

    Sort ranges and merge overlapping or touching closed intervals.

    MediumLoading…
  14. 14
    Trees & graphs

    Tree depth

    Find the longest root-to-leaf path in a binary tree.

    EasyLoading…
  15. 15
    Trees & graphs

    Dependency cycle detection

    Detect cycles across every component of a directed dependency graph.

    MediumLoading…
  16. 16
    Queues & scheduling

    Retrying job queue

    Reserve FIFO work, retry safely and reject stale acknowledgements without losing capacity.

    MediumLoading…
  17. 17
    Concurrency reasoning

    Bounded worker scheduling

    Keep worker capacity, FIFO admission and cancellation correct as events overlap.

    MediumLoading…
  18. 18
    Networking

    Framed message decoder

    Recover complete binary messages from split reads without losing an incomplete tail.

    MediumLoading…
  19. 19
    State & dependencies

    Task registry

    Build a task registry, then extend it as new requirements unlock.

    MediumLoading…