Public task directory

Technical interview practice tasks

Find a question to practise. Browse by page, or open Practice to filter tasks by round, role and topic.

Page 5 of 152 · 7,273 tasks

Coding (Algo) · Medium · 40 min

Find Earlier Lower Readings

Monotonic stack · Medium A metrics display annotates each reading with the closest earlier reading that was strictly lower. Looking back by scanning the entire history for every reading is.

View task

Coding (Algo) · Hard · 45 min

Find the Largest Solid Rectangle

Monotonic stack · Hard A storage visualization represents adjacent unit-width columns with different non-negative heights. A solid rectangle must fit below every column it spans. The report.

View task

Coding (Algo) · Medium · 35 min

Find the Next Higher Reading

Monotonic stack · Medium A monitoring chart annotates each recorded measurement with the first later reading that exceeds it. Equal readings do not end the wait, and the annotation needs the.

View task

Coding (Algo) · Medium · 40 min

Measure the Current High Span

Monotonic stack · Medium A monitoring chart annotates each measurement with the consecutive period ending there during which no reading exceeded the current value. The period always includes.

View task

Coding (Algo) · Medium · 30 min

Next Higher Reading

Monotonic stack · Medium A monitoring tool annotates each reading with the next later reading that is strictly higher. It needs the first qualifying value in time order, not the largest.

View task

Coding (Algo) · Easy · 25 min

Common Batch Size

Number theory · Easy A data importer splits several record counts into equal-sized batches without a remainder. Counts can be signed adjustments; their sign does not affect divisibility..

View task

Coding (Algo) · Medium · 40 min

Count Prime Shard Sizes

Number theory · Medium A local capacity experiment considers prime-sized shard counts up to a supplied upper limit. The caller needs the number of choices, including the limit when it is.

View task

Coding (Algo) · Medium · 40 min

Repeat a Modular Transform

Number theory · Medium A deterministic numeric simulator applies the same multiplicative transformation many times and keeps only its remainder. The exponent can be too large to repeat the.

View task

Coding (Algo) · Medium · 40 min

Synchronize Repeating Cycles

Number theory · Medium A scheduler combines periodic maintenance cycles expressed in whole ticks. It needs the first shared period, not a simulation of every tick. A disabled cycle is.

View task

Coding (Algo) · Medium · 40 min

Count Mirrored Text Ranges

Palindromes · Medium A text-analysis tool counts contiguous ranges that read the same forward and backward. It counts positions rather than distinct strings: identical text occurring in.

View task

Coding (Algo) · Medium · 40 min

Find the Longest Mirrored Range

Palindromes · Medium A text-analysis tool highlights the length of the longest contiguous range that reads the same in both directions. Characters cannot be rearranged or skipped. Ties need.

View task

Coding (Algo) · Easy · 25 min

Group Readings Around a Threshold

Partitioning · Easy A triage display groups measurements below, equal to and above a threshold. Within each group it must retain arrival order so an operator can still follow the sequence..

View task

Coding (Algo) · Medium · 35 min

Count Overlapping Text Matches

Prefix function · Medium A text analyzer counts every position at which an exact pattern begins. Matches may share characters, so skipping ahead by the full pattern length after a match.

View task

Coding (Algo) · Hard · 45 min

Find a Pattern in a Stream

Prefix function · Hard A scanner searches a long in-memory text for the first occurrence of a pattern. Repetitive text makes restart-at-every-position matching quadratic. The scanner needs a.

View task

Coding (Algo) · Easy · 20 min

Count Matching Name Prefixes

Prefix matching · Easy A name-filter preview receives a list of lowercase alphanumeric identifiers and a single search prefix. It needs the number of matching entries. Duplicate identifiers.

View task

Coding (Algo) · Medium · 40 min

Count Batch Aligned Periods

Prefix sum · Medium A ledger records signed adjustments over time. An analyst wants the number of continuous periods whose net adjustment is divisible by a batch size. Negative changes and.

View task

Coding (Algo) · Medium · 35 min

Count Matching Ranges

Prefix sum · Medium A ledger stores signed balance changes in their original order. An analyst wants to know how many uninterrupted ranges add up to a requested adjustment. A range may.

View task

Coding (Algo) · Hard · 45 min

Find the Longest Range Within Budget

Prefix sum · Hard A ledger records positive charges and negative refunds in time order. A report needs the longest uninterrupted period whose net charge stays within a chosen budget. Refunds.

View task

Coding (Algo) · Hard · 45 min

Find the Shortest Signed Threshold Range

Prefix sum · Hard A telemetry series records both positive and negative adjustments. An alert should identify the shortest uninterrupted period whose net total reaches a threshold. Negative.

View task

Coding (Algo) · Hard · 75 min

Historical Balance Ranges

Prefix sum · Hard An audit dashboard asks for account-range balances at many historical times. Replaying all ledger entries for every query is too expensive. Answer inclusive account-range.

View task

Coding (Algo) · Easy · 15 min

Ledger Prefix Balances

Prefix sum · Easy A statement screen needs the balance after every signed transaction, starting from an opening balance. Return the running balance after each adjustment. Input Call .

View task

Coding (Algo) · Medium · 30 min

Products without Each Entry

Prefix sum · Medium A numerical report needs one product for every excluded array entry. Values can include zero, so dividing the full product is not valid. The report must keep the original.

View task

Coding (Algo) · Easy · 25 min

Total Readings Across Requested Periods

Prefix sum · Easy An analytics screen asks for totals over many periods of the same signed measurement series. The data is a fixed snapshot: all adjustments have already been applied..

View task

Coding (Algo) · Medium · 40 min

Combine Status Masks Across Periods

Prefix xor · Medium A diagnostic tool combines status masks using XOR over requested intervals of an event log. The log is immutable for this request. Masks use all 32 bits, so a language.

View task

Coding (Algo) · Medium · 35 min

Minimize Repeated Merge Work

Priority queue · Medium A file-compaction service repeatedly joins two batches. Each join costs the combined lengths and produces one batch of that length for later joins. The choice of.

View task

Coding (Algo) · Medium · 40 min

Minimize the Largest Route Cost

Priority queue · Medium A delivery route is limited by its most expensive individual connection rather than by the total cost. A route with more edges can be preferable if each connection is.

View task

Coding (Algo) · Easy · 15 min

Total One Array Range

Range boundaries · Easy A report requests the total of one selected range in an immutable numeric array. Only one range is evaluated per call, so building a reusable index is not required..

View task

Coding (Algo) · Easy · 20 min

Compress Status Runs

Run length encoding · Easy A status feed stores many adjacent identical observations. A compact report must preserve changes rather than merge all equal statuses globally. Run-length encode.

View task

Coding (Algo) · Medium · 40 min

Find the Lowest Reading in Each Period

Segment tree · Medium An incident report highlights the lowest observed reading in each selected period. It may ask about many overlapping periods in one fixed snapshot. The implementation.

View task

Coding (Algo) · Hard · 60 min

Live Validation Ranges

Segment tree · Hard A large form tracks invalid counts across repeated nested sections. Edits change one field while the summary requests arbitrary sections. Apply point replacements and.

View task

Coding (Algo) · Medium · 40 min

Select a Ranked Value

Selection · Medium A ranking service needs one order statistic from an unsorted batch. Sorting the entire batch is unnecessary. Duplicate values occupy separate positions in the descending.

View task

Coding (Algo) · Hard · 60 min

Bounded Transfer Cost

Shortest path · Hard A settlement planner permits at most k directed transfers. Some transfers carry rebates, so costs may be negative. Return the cheapest source-to-target cost using at.

View task

Coding (Algo) · Hard · 65 min

Discounted Service Route

Shortest path · Hard A service request travels through directed connections with non-negative costs. One connection on the route may use a promotional capacity allocation that halves its.

View task

Coding (Algo) · Medium · 40 min

Explain Unused Route Connections

Shortest path · Medium A diagnostic view explains how each directed connection compares with the cheapest known costs from a selected start. Its slack is the extra cost introduced by using.

View task

Coding (Algo) · Medium · 40 min

Find the Fewest Handoffs

Shortest path · Medium A routing map models each handoff as one directed edge with equal cost. A request must reach a destination using as few handoffs as possible. The result should.

View task

Coding (Algo) · Medium · 40 min

Offline Map Distance

Shortest path · Medium A downloaded tile map marks blocked cells. Navigation needs the fewest orthogonal moves between two cells without contacting a routing service. Return the shortest.

View task

Coding (Algo) · Medium · 45 min

Shortest Delivery Costs

Shortest path · Medium A routing service models one-way delivery links between hubs. Every link has a non-negative integer cost. For a selected source hub, the planner needs the cheapest.

View task

Coding (Algo) · Medium · 40 min

Accepted Request Window

Sliding window · Medium A per-account rate limiter accepts at most limit requests in a trailing window. Rejected requests must not consume future allowance. Return one acceptance decision.

View task

Coding (Algo) · Medium · 35 min

Affordable Replay Window

Sliding window · Medium A mobile client replays a contiguous section of queued actions while keeping total transfer size within a budget. Return the longest contiguous window whose total.

View task

Coding (Algo) · Medium · 40 min

Count Periods With Exactly K Event Types

Sliding window · Medium A telemetry analysis counts continuous periods containing exactly a requested number of event types. Repeated occurrences do not increase the number of types, but.

View task

Coding (Algo) · Medium · 35 min

Distinct Activity Window

Sliding window · Medium An activity panel highlights the longest uninterrupted run without repeating an event kind. Return the length of the longest contiguous subarray containing distinct.

View task

Coding (Algo) · Medium · 40 min

Find the Longest Limited Variety Period

Sliding window · Medium A cache analysis looks for the longest continuous period touching no more than k distinct resources. Repeated accesses to a resource do not consume additional.

View task

Coding (Algo) · Hard · 65 min

Live Latency Median

Sliding window · Hard A performance panel displays a median over the most recent k requests. Sorting every new window is too slow. Return the median of every full fixed-width window. Input.

View task

Coding (Algo) · Medium · 30 min

Longest Distinct Run

Sliding window · Medium A diagnostic tool scans a sequence of one-character event codes. It highlights the longest uninterrupted run in which no code appears twice. This is a string.

View task

Coding (Algo) · Hard · 40 min

Peak in Every Window

Sliding window · Hard A monitoring display receives a sequence of integer measurements. For every complete group of k adjacent readings it needs the peak, in time order. Recomputing the peak.

View task

Coding (Algo) · Medium · 40 min

Required Marker Windows

Sliding window · Medium A log scanner looks for short excerpts containing exactly a required multiset of markers. Marker order is irrelevant, but repeated markers count separately. Return.

View task

Coding (Algo) · Medium · 30 min

Shortest Target Range

Sliding window · Medium A batch planner receives positive record counts from consecutive partitions. It needs the shortest uninterrupted set of partitions that provides at least a target.

View task

Coding (Algo) · Easy · 25 min

Choose Unique Prefix Suggestions

Sorting · Easy A command palette receives a small dictionary and needs a single batch of prefix suggestions. Duplicate dictionary entries must not repeat in the menu. Results need.

View task