practice a little every day — you've got this ♡
Greedy & Intervals Interview Problems
Practice 5969 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.
- 5969
- Problems
- 2211
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 151–180 of 181 results
- Greedy & IntervalsMediumAuto-gradedMaximum Concurrent Reservations
Calculate the peak number of overlapping time intervals to determine minimum resource capacity.
Greedy & Intervalsintervalssweep-linesorting - Greedy & IntervalsEasyAuto-gradedIntercept Aircraft and Count User Sessions
Tests greedy deadline scheduling for time-critical interception tasks and event grouping with gap-based sessionization.
Greedy & Intervalsgreedysortingsimulationevent-processing - Greedy & IntervalsMediumAuto-gradedOptimal 1D Coverage: Minimize Worst-Case Distance to k Centers
Tests binary-search-on-answer combined with a greedy interval feasibility check to solve the 1D k-center minimax placement problem.
Greedy & Intervalsbinary-searchgreedysorting - Greedy & IntervalsMediumAuto-gradedMinimum Conference Rooms for Scheduled Meetings
Tests greedy interval scheduling with heap-based resource allocation to find the smallest number of rooms needed for overlapping meetings.
Greedy & Intervalsintervalsheapgreedyscheduling - Greedy & IntervalsEasyAuto-gradedCount Rooms In Use at Peak Time
Tests the sweep-line technique by finding the maximum number of meeting rooms simultaneously occupied across a set of half-open booking intervals.
Greedy & Intervalsgreedysweep lineintervals - Greedy & IntervalsMediumAuto-gradedMinimum Paint Strokes to Cover a Board
Tests the ability to merge overlapping intervals greedily to find the fewest horizontal paint strokes needed to fully cover a set of colored segments on a 1-D board.
Greedy & Intervalsgreedyintervalssorting - Greedy & IntervalsMediumAuto-gradedSchedule Maximum Jobs Before Their Deadlines
Tests greedy scheduling with deadlines: select the maximum number of unit-length jobs, each with a profit and deadline, maximizing total profit within deadline slots.
Greedy & Intervalsgreedyschedulingintervalssorting - Greedy & IntervalsMediumAuto-gradedMaximum Placement with Spacing Constraints
Tests greedy iteration with adjacency rules, requiring precise edge-case handling and index management.
Greedy & Intervalsgreedyarraysiteration - Greedy & IntervalsEasyAuto-gradedLocate Shared Free Time Slots Across Multiple Schedules
Tests interval merging to identify time windows where all participants are simultaneously unoccupied for a minimum duration.
Greedy & Intervalsintervalsmergingscheduling - Greedy & IntervalsMediumAuto-gradedMaximize Tasks Completed Before Their Deadlines
Tests whether candidates can apply a greedy scheduling-with-deadlines strategy to select and order tasks that maximize the count of on-time completions.
Greedy & Intervalsgreedyintervalsscheduling - Greedy & IntervalsMediumAuto-gradedMaximum Sum Window Over Sparse Value Ranges
Find the largest sum of k consecutive positions when values are defined by disjoint intervals on an infinite line.
Greedy & Intervalssliding-windowtwo-pointersintervalsmodular-arithmetic - Greedy & IntervalsMediumAuto-gradedTask Assignment with Skill Matching and One Flexible Worker
Tests greedy selection within independent groups and optimal placement of a single unrestricted resource.
Greedy & Intervalsgreedyhash-tablesorting - Greedy & IntervalsMediumAuto-gradedMinimum Days to Execute Sequential Jobs with Cooldown
Simulates executing a fixed sequence of jobs where re-running the same job requires waiting through a cooldown period.
Greedy & Intervalsgreedyhash-mapsimulation - Greedy & IntervalsMediumAuto-gradedMerge Overlapping Regions from Two Sorted Interval Lists
Tests two-pointer traversal on sorted interval lists to find all pairwise overlaps in linear time.
Greedy & Intervalsintervalstwo-pointerssortingarrays - Greedy & IntervalsMediumAuto-gradedLocate Uncovered Ranges Between Intervals
Tests interval merging, sorting, and boundary logic to identify all missing integer ranges within the overall coverage span.
Greedy & Intervalsintervalssortingmergingranges - Greedy & IntervalsMediumAuto-gradedMinimum Deletions to Remove Half the Elements
Tests greedy selection by frequency: choose the fewest distinct values whose total occurrences cover at least half the array.
Greedy & Intervalsgreedyhashingsorting - Greedy & IntervalsMediumAuto-gradedFill Bag with Maximum Value from Identical-Weight Items
Tests greedy optimization when all items have uniform weight, requiring recognition that standard knapsack DP is unnecessary and handling large counts efficiently.
Greedy & Intervalsgreedysortingoptimization - Greedy & IntervalsMediumAuto-gradedBudget-Constrained Round-Trip Selection
Tests greedy selection and sorting to maximize items within a budget while minimizing cost for that maximum count.
Greedy & Intervalsgreedysortingarrays - Greedy & IntervalsMediumAuto-gradedFind Available Time Slots in a Repeating Weekly Schedule
Tests interval merging with time zones, weekly recurrence, and range filtering to find deployable windows on a cyclic timeline.
Greedy & Intervalsintervalsarraystime-zones - Greedy & IntervalsMediumAuto-gradedConsolidate Half-Open Interval Ranges
Tests interval merging with half-open semantics, distinguishing overlap from adjacency, and handling nested ranges correctly.
Greedy & Intervalsintervalssortinggreedyarray-manipulation - Greedy & IntervalsHardAuto-gradedMinimum Guards to Cover All Museum Gallery Segments
Tests ability to apply a sweep-line with a greedy exchange argument to optimally place point guards that each cover a fixed-radius interval on a 1-D gallery.
Greedy & Intervalsgreedyintervalssweep line - Greedy & IntervalsMediumAuto-gradedAssign Tasks to Time Slots with Minimum Idle Penalty
Tests the exchange-argument greedy technique by scheduling deadline-bearing tasks into time slots to minimize total weighted idle (missed-deadline) penalty.
Greedy & Intervalsgreedyintervalsschedulingexchange argument - Greedy & IntervalsMediumAuto-gradedMaximize Completed Jobs with Deadlines
Tests greedy scheduling with deadlines: select and order unit-length jobs to maximize total profit, applying an exchange argument to prove optimality.
Greedy & Intervalsgreedyschedulingsorting - Greedy & IntervalsMediumAuto-gradedMaximum Simultaneous Room Bookings
Tests the sweep line technique on interval scheduling to find the peak number of overlapping room bookings over a timeline.
Greedy & Intervalssweep lineintervalsgreedy - Greedy & IntervalsMediumAuto-gradedMinimize Maximum Job Lateness with Deadlines
Tests the classic exchange-argument greedy insight: scheduling jobs by earliest deadline minimizes the maximum lateness over all jobs.
Greedy & Intervalsgreedyintervalssortingexchange-argument - Greedy & IntervalsMediumAuto-gradedMinimum Penalty Class Schedule with Fixed Breaks
Tests whether a candidate can apply an exchange-argument greedy to order tasks with deadlines and penalties to minimize total weighted lateness, with fixed unavailable time windows.
Greedy & Intervalsgreedyintervalsschedulingexchange argument - Greedy & IntervalsHardAuto-gradedMinimum Penalty Task Schedule with Deadlines
Tests the classic exchange-argument greedy insight that scheduling jobs by deadline minimizes total weighted lateness on a single machine.
Greedy & Intervalsgreedyintervalsschedulingexchange-argument - Greedy & IntervalsMediumAuto-gradedMaximum Coverage From Non-Overlapping Intervals
Tests ability to merge overlapping intervals and use a greedy sweep to find the maximum total length covered by selecting at most K non-overlapping merged segments.
Greedy & Intervalsgreedyintervalssorting - Greedy & IntervalsMediumAuto-gradedMinimum Breaks to Cover All Shifts with Rest Windows
Tests whether a candidate can apply an exchange-argument greedy to schedule the fewest rest-window insertions so every worker shift is covered without violating a maximum continuous-work limit.
Greedy & Intervalsgreedyintervalsschedulingexchange argument - Greedy & IntervalsEasyAuto-gradedCount Peak Hours Across Venue Time Slots
Tests the ability to use a sweep line (difference array) to efficiently count how many time slots are simultaneously "active" and find the maximum overlap count.
Greedy & Intervalsgreedyintervalssweep line