practice a little every day — you've got this ♡
Interview Practice Problems
Practice 6010 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.
- 6010
- Problems
- 2227
- Auto-graded
- 15
- Topics
- 275
- Added today
Showing 721–750 of 6010 results
- System DesignMediumModel answerCircular Waits and Lock Contention: Spotting and Preventing Deadlocks
Explain what a deadlock is, the conditions that make one possible, realistic scenarios, and the engineering techniques used to prevent, avoid, detect and recover from them.
System Designconcurrencydeadlocklockingoperating-systems - BehavioralMediumModel answerMotivation, Setbacks, and Leading a Team Through Delivery Pressure
A two-part behavioral practice problem on explaining why you want a specific role, responding to a rejection, and describing how you would manage delivery, upward pressure, and extra effort.
Behavioralbehavioralleadershipmotivationconflict-resolution - Data Structure DesignMediumAuto-gradedTop-of-Book Quotes per Venue and Across All Venues
Aggregate order records by price level to answer per-venue and market-wide best bid and ask queries, summing the size at the best price.
Data Structure Designhash-mapaggregationorder-booksimulation - Arrays & HashingMediumAuto-gradedEnumerate All Index Pairs Adding Up to a Goal Value
Tests hash-map indexing of duplicate values to list every index pair i < j whose values sum to a goal, in a specific sorted output order.
Arrays & Hashinghash-maptwo-sumduplicatesenumeration - Arrays & HashingMediumAuto-gradedSeven-Day Spend Grid per Shopper Using Only String Dates
Aggregate (shopper, date, amount) records into per-shopper totals for a 7-day window, using hand-written ISO date stepping and hashing instead of date libraries.
Arrays & Hashinghashingaggregationstring-datessimulation - SQL & DataEasyAuto-gradedUnify Two Yearly Sales Record Lists With a Mismatched Key
Tests normalizing records from two sources with a misspelled field name, casting a numeric field to float, and concatenating the lists in order without mutating inputs.
SQL & Datadata-cleaningdictionariesschema-alignmentconcatenation - BehavioralMediumModel answerRunning a Production Incident from Page to Postmortem
Describe how you own an on-call shift and drive a production incident from the first page through mitigation, communication, verified recovery, and lasting fixes.
Behavioralon-callincident-responsepostmortemcommunication - SQL & DataMediumAuto-gradedFind Riders Idle Through the Latest Week of Activity
Given user and ride records, return users with no ride in the 7-day window ending at the latest ride date, including users who never rode, sorted by user_id.
SQL & Dataanti-joindate-windowhash-setfiltering - System DesignMediumModel answerCutting Duplicate HTTP Calls in a curl-Driven Workflow
Instrument an HTTP client to count and attribute its calls, detect wasteful repeats, reduce them safely, and prove the change is correct and stays fixed.
System Designobservabilityhttpcachingbatching - Greedy & IntervalsMediumAuto-gradedPeak Overlap of Half-Open Time Ranges
Compute the largest number of simultaneously running half-open time ranges using a sweep over sorted start and end events, with correct handling of ties at boundaries.
Greedy & Intervalssweep-lineintervalssortinghalf-open-intervals - StringsEasyAuto-gradedShared Starting Sequence in String Array
Determine the longest initial substring shared across every word in a given list.
Stringsstringsarraysprefix - Greedy & IntervalsMediumAuto-gradedMaximum Number With Even Counts of Ones and Twos
Delete characters from a string of 1s and 2s so both digit counts are even, and return the largest possible number. Tests greedy subsequence construction with count constraints.
Greedy & Intervalsgreedystringssubsequencelexicographic - Heaps, Sorting & SearchMediumAuto-gradedRank Point Pairs by Bounding Hyperrectangle Volume
Enumerate point pairs in d dimensions, compute the volume of the box they span, drop flat boxes, and return the rest in a strict multi-key order.
Heaps, Sorting & Searchsortingpair-enumerationgeometrymulti-key-sort - Dynamic ProgrammingHardAuto-gradedCoin Pile Fusion: Who Makes the Last Merge?
Decide the winner of a two-player impartial game where piles are fused under a size cap, using memoized game-tree search over canonical multiset states.
Dynamic Programminggame-theorymemoizationbacktrackingbitmask-states - System DesignMediumModel answerHow the JVM Allocates and Reclaims Memory Without Manual Freeing
Walk through how the JVM places objects in memory, decides which are dead, reclaims them with different collectors, and why leaks and resource problems still occur.
System Designjavajvmgarbage-collectionmemory-management - SQL & DataMediumModel answerCalculate Top Customer Revenue Share and 7-Day Growth by Product Model
Write a SQL query to compute 7-day revenue growth and identify top spenders per product model with tie-breaking logic based on historical purchase date.
SQL & Datasqlwindow-functionsaggregationsjoins - Trees & GraphsMediumAuto-gradedLexicographically Smallest Valid Task Schedule
Decide whether tasks with prerequisite constraints can all be run, and if so produce the lexicographically smallest valid run order, using topological sorting with a min-heap.
Trees & Graphstopological-sortgraphheapcycle-detection - Dynamic ProgrammingMediumAuto-gradedBooth Assignment Plan: Cheapest Non-Repeating Color Sequence
Choose one of three colors per day to minimize total cost with no color on two adjacent days, then return the actual sequence using DP with backtracking.
Dynamic Programmingdynamic-programmingpath-reconstructionarrays - Data Structure DesignMediumAuto-gradedSeat Assignment with Forward-Only Probing on a Fixed Row
Decide whether every request in a sequence can be seated in a fixed row when taken spots push it to the next free higher slot; tests efficient next-free-slot lookup, e.g. with union-find.
Data Structure Designunion-findsimulationarraysgreedy - StringsEasyAuto-gradedScreen Pasted Card Numbers: Format, Issuer Prefix and Luhn
Filter strings by a character and length rule, an issuer-prefix range and the Luhn checksum, returning the original text of each valid entry in input order.
Stringsstringsvalidationluhnsimulation - System DesignHardModel answerExactly-Once Click Event Cleanup in a Streaming Lake Pipeline
Design a Spark Structured Streaming job that removes retry-induced duplicate click events at 10M/s with a 24-hour window, handling late data, hot keys, idempotent writes, and backfills.
System Designsparkstructured-streamingdeduplicationdata-skew - Trees & GraphsMediumAuto-gradedRank Suggested Connections by Shared Friends
Build an undirected graph from friendship pairs, then rank every non-friend of a target user by mutual friends, degree and ID using a composite sort key.
Trees & Graphsgraphadjacency-listsortingsets - Heaps, Sorting & SearchMediumModel answerOrdering a Hundred Million Decimal Digits in Place
Order a huge byte array holding only the values 0 to 9 in linear time with constant extra memory, then reason about storage layout, memory bandwidth and expected runtime.
Heaps, Sorting & Searchcounting-sortin-placememory-bandwidthbytearray - BehavioralHardModel answerTen Leadership Stories Every Product Manager Should Prepare
Build a bank of structured, metric-backed stories that answer ten common product leadership prompts, from high-impact launches to disagreeing and committing.
Behavioralbehavioralproduct-managementleadershipstar-method - Dynamic ProgrammingMediumAuto-gradedMaximum Earnings from Back-to-Back Booking Slots
Pick non-overlapping time slots, where one may begin exactly as another finishes, to maximize total payout; tests weighted interval scheduling with sorting, DP and binary search.
Dynamic Programmingdynamic-programmingbinary-searchintervalssorting - SQL & DataMediumAuto-gradedWeekly Totals with 3-Week Rolling Sum in Pacific Time
Bucket timestamped payments into Pacific-time Monday weeks, fill empty weeks with zero, and report weekly and trailing three-week totals.
SQL & Datatime zonesdate bucketingrolling windowaggregation - Arrays & HashingEasyAuto-gradedCompute Usage and Quality Metrics from Workplace Search Logs
Aggregate a list of search log records into funnel, quality, latency and repeat-usage metrics, handling empty input and even-length medians.
Arrays & Hashinghash-mapaggregationsimulationmedian - Trees & GraphsMediumAuto-gradedSchedule Courses Under Prerequisite Rules
Produce a deterministic course order that respects prerequisite pairs using a queue-based topological sort, or an empty list if the prerequisites contain a cycle.
Trees & Graphstopological-sortgraphbfscycle-detection - StringsMediumModel answerRound a Decimal String Without Using Floats
Round a decimal number given as a string to the nearest integer, then to its last significant digit, using digit-level arithmetic and carry handling instead of floating-point types.
Stringsstringscarry-propagationroundingparsing - System DesignMediumModel answerCounting Nodes in a Distributed Tree Network
Design a distributed algorithm and protocol to count all nodes in an N-ary tree using asynchronous message passing, local state, and deduplication.
System Designdistributed-systemsconcurrencytrees-graphssystem-design