Training mode

Signal Sniper & twin-trap arcade.

Timed scoring and IndexedDB spaced replay land later. Use the five 12-second cards below as a dry-run, then jump into a live problem.

  1. 1 · 12s

    N ≤ 2e5, Q ≤ 2e5, answer every query

    Prefix / odometer or (N+Q) log N — never O(NQ)

  2. 2 · 12s

    Longest subarray of positives that still satisfies a budget

    Elastic inchworm. Negatives break it — that is the twin trap.

  3. 3 · 12s

    N ≤ 18, count subsets / assignments

    O(2^N) bitmask or backtracking is the intended machine

  4. 4 · 12s

    Next greater to the right / daily temperatures

    VIP bouncer stack — each index waits until a greater arrives

  5. 5 · 12s

    Courses with prerequisites, detect a deadlock

    Kahn indegree == 0 queue. A leftover node is a cycle.

Jump into a workbench