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 4 of 152 · 7,273 tasks

Coding (Algo) · Hard · 60 min

Wildcard Route Match

Dynamic programming · Hard A static routing tool supports a small glob language to decide whether a complete path matches a route pattern. Match the entire path using ? for one character and.

View task

Coding (Algo) · Easy · 20 min

Expired Cache Keys

Expiry · Easy A cache maintenance endpoint receives entries with explicit expiry timestamps and a supplied clock. It must report expired keys without relying on system time. Return expired.

View task

Coding (Algo) · Easy · 20 min

Healthy Instance IDs

Filtering · Easy A control plane receives one health snapshot per instance. Traffic may go only to ready instances below a fixed error threshold. Return eligible IDs in ascending ASCII.

View task

Coding (Algo) · Easy · 20 min

Recorded Route Distance

Geometry · Easy An offline tracker stores integer grid coordinates in visit order. The summary needs the travelled Manhattan distance, not displacement from the start. Sum distances between.

View task

Coding (Algo) · Medium · 35 min

Count Connected Groups

Graph traversal · Medium A topology snapshot lists devices and undirected connections. Operations needs the number of separately reachable groups, including devices with no connections. This.

View task

Coding (Algo) · Easy · 25 min

Count Reachable Services

Graph traversal · Easy A dependency map records which service can call which other service. Starting from one service, an impact check counts all services reachable through directed calls.

View task

Coding (Algo) · Medium · 40 min

Measure Disconnected Groups

Graph traversal · Medium A network report groups nodes that are connected when link direction is ignored. It needs the sizes of every group, ordered largest first, including isolated nodes..

View task

Coding (Algo) · Medium · 35 min

Split Conflicting Services

Graph traversal · Medium A scheduler wants to divide services into two groups. Each undirected edge says that its endpoints must belong to different groups. Disconnected services and.

View task

Coding (Algo) · Medium · 30 min

Choose Compatible Time Windows

Greedy · Medium A scheduling tool selects requests for one resource. Each request occupies a time window and has equal value, so the objective is to accept as many as possible. The caller.

View task

Coding (Algo) · Medium · 30 min

Count Connected Window Groups

Greedy · Medium A timeline groups imported windows when overlap connects them directly or through other windows. It needs a group count rather than a room count or a chosen schedule..

View task

Coding (Algo) · Medium · 30 min

Measure Concurrent Reservations

Greedy · Medium A booking service needs enough identical rooms for all requests at once. It must measure peak simultaneous occupancy rather than choose which requests to keep. When one.

View task

Coding (Algo) · Medium · 30 min

Measure Total Covered Time

Greedy · Medium A reporting service receives possibly overlapping periods and must calculate the total time covered at least once. Summing individual durations double-counts overlaps, while.

View task

Coding (Algo) · Medium · 35 min

Minimum Coverage Checkpoints

Greedy · Medium An inspector can choose checkpoints on a number line. Each required coverage interval must contain at least one chosen checkpoint. One checkpoint may satisfy several.

View task

Coding (Algo) · Medium · 30 min

Place the Fewest Inspection Points

Greedy · Medium A coverage tool chooses inspection times so every retained time window contains at least one chosen point. A point can cover several overlapping windows. Endpoint rules.

View task

Coding (Algo) · Easy · 25 min

Account Ledger Totals

Hash map · Easy A ledger export contains signed integer-cent adjustments. A report needs one balance per account. Sum adjustments per account and return accounts in ASCII order. Input Call .

View task

Coding (Algo) · Medium · 40 min

Count Matching Measurement Gaps

Hash map · Medium An analysis tool compares pairs of recorded measurements and counts those separated by a required absolute gap. Measurements may repeat; two equal values at different.

View task

Coding (Algo) · Easy · 25 min

Count Matching Pairs

Hash map · Easy A reconciliation tool receives integer adjustments in a batch. It must count pairs of different entries whose amounts add to a requested total. Repeated amounts are separate.

View task

Coding (Algo) · Easy · 25 min

Count Repeated Event Types

Hash map · Easy A monitoring report needs the number of event types occurring often enough to investigate. Repeated deliveries contribute to a type’s frequency, but the report counts each.

View task

Coding (Algo) · Easy · 25 min

Duration Buckets

Hash map · Easy An ingestion API summarizes non-negative durations into fixed-width histogram buckets. Return only occupied buckets sorted by bucket number. Input Call - Implement.

View task

Coding (Algo) · Easy · 20 min

Find a Pair With the Target Total

Hash map · Easy A reconciliation check needs two distinct batch entries whose amounts add to a requested total. Entries may have equal amounts but the same entry cannot be used twice. The.

View task

Coding (Algo) · Easy · 25 min

Find the First Unrepeated Event

Hash map · Easy A diagnostic stream contains integer event codes, including repeated deliveries. A support tool highlights the earliest event whose code occurs only once in the entire.

View task

Coding (Algo) · Medium · 30 min

Idempotency Acceptance Trace

Hash map · Medium A write endpoint suppresses repeated keys for a fixed duration after their last accepted request. Rejected retries do not refresh the duration. Return whether each.

View task

Coding (Algo) · Easy · 25 min

Latest Notification Payload

Hash map · Easy A notification consumer receives corrected payloads under the same ID. Display order should follow first arrival while contents use the last update. Deduplicate by ID using.

View task

Coding (Algo) · Medium · 45 min

LRU Cache Trace

Hash map · Medium A service cache evicts the least recently used key when capacity is exceeded. Reads and overwrites both update recency. Simulate get and put operations and return get.

View task

Coding (Algo) · Medium · 35 min

Rank Frequent Values

Hash map · Medium A dashboard summarizes which numeric event codes occur most often. It displays only k distinct codes. The display must be deterministic when several codes have the same.

View task

Coding (Algo) · Hard · 45 min

Replay Cache Operations

Hash map · Hard A service uses a bounded cache and records its get and put operations. You are building a deterministic replay tool that predicts every get result under least-recently-used.

View task

Coding (Algo) · Easy · 20 min

Selected Cart Total

Hash map · Easy A cart summary must total only selected products before rendering. Selection events may repeat a product ID. Return the selected total in integer cents without charging for.

View task

Coding (Algo) · Easy · 25 min

Summarize Event Frequencies

Hash map · Easy A diagnostic report groups integer event codes by how often they appear. The report must be stable across repeated runs and easy to compare, so groups are ordered numerically.

View task

Coding (Algo) · Medium · 30 min

Top Requested Routes

Hash map · Medium An API dashboard ranks routes by traffic count. Equal counts must produce a stable report across processes. Return at most k route names sorted by decreasing frequency then.

View task

Coding (Algo) · Easy · 25 min

Unread Thread Badges

Hash map · Easy A mobile inbox receives messages from multiple threads. Read messages must not contribute to badges, but every unread message counts. Return unread counts for threads with at.

View task

Coding (Algo) · Easy · 25 min

Visible Tag Counts

Hash map · Easy A tag picker receives duplicate events and must display the frequency of each tag in first-seen order. Count case-sensitive tags without changing first-appearance ordering..

View task

Coding (Algo) · Easy · 20 min

First Replayed Request

Hash set · Easy An API audit stream contains request IDs in arrival order. Operations wants the first event that repeats an earlier ID. Return the index of the earliest duplicate occurrence..

View task

Coding (Algo) · Easy · 20 min

Missing Result Pages

Hash set · Easy A search UI knows the total number of result pages and the page numbers already cached. It needs the missing pages in navigation order. Return page numbers from 1 through.

View task

Coding (Algo) · Easy · 20 min

Shared Record IDs

Hash set · Easy A client and API compare record IDs to identify shared records. Duplicate IDs on either side must not duplicate the result. Return the set intersection in ascending numeric.

View task

Coding (Algo) · Medium · 45 min

Merge Sorted Feeds

Heap · Medium An offline reader loads several already-sorted event feeds. It needs one sorted timeline without re-sorting all events. Merge all integer feeds while retaining duplicate.

View task

Coding (Algo) · Hard · 45 min

Report the Median After Every Reading

Heap · Hard A monitoring stream must display the median after every incoming signed reading. Re-sorting every prefix is too slow for a long sequence. The median changes after each insertion.

View task

Coding (Algo) · Easy · 20 min

First Invalid Field

Input validation · Easy A form must move focus to the earliest invalid field in the visual layout rather than the order in which validation responses arrived. Return the first field ID in.

View task

Coding (Algo) · Medium · 35 min

Merge Busy Slots

Intervals · Medium A scheduling screen receives overlapping busy intervals from several calendars. The UI needs a compact timeline. Merge overlapping or touching half-open intervals and.

View task

Coding (Algo) · Medium · 30 min

Merge Coverage Ranges

Intervals · Medium A reporting service receives coverage ranges from several workers. The ranges can arrive out of order and overlap. It needs a minimal ordered list describing the same.

View task

Coding (Algo) · Easy · 25 min

Count Records Before a Repeated Link

Linked list · Easy A linked-record preview must stop at the first repeated node or at the end of the chain. The backing array can contain unrelated records that are not part of this preview..

View task

Coding (Algo) · Medium · 35 min

Read a Record From the Preview End

Linked list · Medium A chain preview lists distinct reachable records and stops before the first repeated node. A user selects a one-based position from the end of that finite preview. The.

View task

Coding (Algo) · Medium · 35 min

Find the Shared Ancestor

Lowest common ancestor · Medium A hierarchy debugger compares two distinct node values in a serialized binary tree. It needs the deepest reachable node that contains both in its descendant.

View task

Coding (Algo) · Easy · 15 min

Total the Primary Matrix Diagonal

Matrices · Easy A square matrix report needs only the primary diagonal from the top-left corner to the bottom-right corner. Other cells can contain unrelated large values. This is a diagonal.

View task

Coding (Algo) · Hard · 90 min

Maximum Replication Throughput

Maximum flow · Hard A replication topology has directed capacity limits. Flow may split across paths, and reverse residual routes may be needed to improve an earlier allocation. Return.

View task

Coding (Algo) · Hard · 50 min

Measure Network Transfer Capacity

Maximum flow · Hard A network planning tool estimates how much integral throughput can pass from one node to another. Directed links have independent capacities, and multiple links may.

View task

Coding (Algo) · Hard · 45 min

Count Target Subsets

Meet in the middle · Hard A batch planner has a small set of indivisible positive workloads and an exact capacity target. It wants to count how many selections fit exactly. Two workloads of.

View task

Coding (Algo) · Medium · 45 min

Minimum Network Connection Cost

Minimum spanning tree · Medium A planner can purchase undirected links between sites. It needs to connect every site at the lowest total cost. Links may have equal or negative costs, but a.

View task

Coding (Algo) · Hard · 60 min

Required Service Wiring

Minimum spanning tree · Hard A service cluster must be wired as one loop-free network. Some links are mandatory because of a signed migration plan. Others are prohibited during the change.

View task