warming up your workspace

C++ practice in Data Structures & Algorithms

Browse the rooms before signing in. Opening a room requires an account and follows your existing access. Practice does not issue certificates.

  • Even-Channel Filter

    The diagnostics board only counts channels with even IDs. Tally them.

    arrays. Free room.

  • Peak Reading

    A sensor array reports the hottest cell. Find the maximum reading.

    arrays. Free room.

  • Telemetry Total

    Mission control needs the total packet count before the downlink window closes.

    arrays. Free room.

  • Valley Floor

    An altimeter logged the descent. Report the lowest reading in the buffer.

    arrays. Free room.

  • Access Pair

    Two key cards must sum to the vault code. The card list is sorted; find their slots.

    two-pointers. Account access required.

  • Best Window

    A revenue stream has good days and bad. Find the largest sum any contiguous run of days produces.

    kadane. Account access required.

  • Bracket Integrity

    A config parser rejects malformed nesting. Validate the brackets.

    stack. Account access required.

  • Log Reversal

    The flight recorder writes backward. Reverse the buffer to read it forward.

    two-pointers. Account access required.

  • Find the Target

    A sorted index needs fast lookups. Binary-search for a key and return its position, or -1.

    binary-search. Account access required.

  • Index Locator

    A sorted manifest needs a part looked up fast. Binary search it.

    binary-search. Account access required.

  • Schedule Merge

    Overlapping maintenance windows must be merged before the rollout.

    sorting. Account access required.

  • Top Priority

    The dispatch queue must surface the k-th highest priority job.

    heap. Account access required.

  • Climb the Stairs

    A staircase can be climbed one or two steps at a time. Count the distinct ways to reach the top with dynamic programming.

    dynamic-programming. Account access required.

  • Credit Exchange

    A vending controller must pay an exact amount with the fewest coins, or report failure.

    dp. Account access required.

  • Territory Count

    A drone map marks land as 1 and water as 0. Count the separate landmasses.

    grid, dfs. Account access required.

  • Upgrade Ladder

    A firmware version ladder accepts only strictly increasing picks. Find the longest run.

    dp. Account access required.

  • Common Divisor

    A scheduler aligns two cycle lengths. Compute their greatest common divisor with Euclid's algorithm.

    math. Account access required.

  • Sentinel Placement

    Place n non-attacking sentinels on an n-by-n grid. Count the valid arrangements.

    backtracking. Account access required.

  • Shortest Relay

    A mesh network must report the shortest weighted relay distance from a source to every node.

    dijkstra. Account access required.

  • String Morph

    A protocol upgrader counts the minimum edits to migrate one token to another.

    dp. Account access required.