FastPrepMinimum Processes to Drop for Synchronization
Problems/Minimum Processes to Drop for Synchronization

Minimum Processes to Drop for Synchronization

Amazon logoAmazon● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamples

Problem statement

Source note: Reported in an Amazon full-time online assessment. The report does not show number limits or a function signature. Our version is about 97% the same as the reported question.

A team runs n processes. Process i executes during the inclusive interval [starts[i], ends[i]].

A remaining set of processes is synchronized if at least one process in the set has an execution interval that overlaps the execution interval of every other process in the set. Intervals that share an endpoint overlap.

Return the minimum number of processes that must be dropped so that the remaining processes form a synchronized set.

A set containing only one process is synchronized.

Function

minimumProcessesToDrop(starts: int[], ends: int[]) → int

Examples

Example 1

starts = [1,2,3,4]ends = [2,3,5,5]return = 1

Drop the process with interval [4, 5]. Among the remaining intervals, [2, 3] overlaps [1, 2] at time 2 and [3, 5] at time 3, so the remaining set is synchronized.

Example 2

starts = [1,4,6]ends = [10,5,8]return = 0

The interval [1, 10] overlaps both other intervals, so all three processes already form a synchronized set.

Example 3

starts = [1,4,7]ends = [2,5,8]return = 2

The three intervals are pairwise disjoint. Keeping any one process produces a synchronized singleton, so two processes must be dropped.

More Amazon Online Assessment questions

  • Lexicographically Largest IdentifierOA · Seen Nov 2026
  • Maximize Shipment Order by Sorting One WindowOA · Seen Nov 2026
  • Top K Frequent ElementsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fill One Exact-Length Binary WindowOA · Seen Nov 2026
  • Minimum Grid InconvenienceOA · Seen Nov 2026
  • Maximize K-Element AND with an Increment BudgetOA · Seen Nov 2026
  • Task SchedulerOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Get Smallest Base SegmentOA · Seen Nov 2026
  • Minimum Cost of Left and Right PropagationOA · Seen Nov 2026
  • Maximum Equal-Bit Pairs in a SubsequenceOA · Seen Nov 2026

Similar questions at other companies

  • Maximum Interactive Team SizeMicrosoft · OAMicrosoft interview questions
  • Maximum Team SizeExpedia · OAExpedia interview questions
  • Employee With the Most OverlapsCitadel · OACitadel interview questions
  • Query Weekly Store Opening HoursApple · PHONE SCREENApple interview questions
  • Closed Interval Overlap QueriesNetflix · ONSITE INTERVIEWNetflix interview questions
  • Batch Point-in-Range QueriesGoogle · PHONE SCREENGoogle interview questions
  • Classify Heap Addresses from a Memory SnapshotSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Unexplained Sightings Outside Flight IntervalsMobileCoin · PHONE SCREEN
  • Maximum Event Value with an Attendance LimitSnowflake · PHONE SCREENSnowflake interview questions
  • Count Lamps Lighting Each PointAirbnb · OAAirbnb interview questions

Interview reports that mention this question

  • Amazon Full-Time OA Problems, Recent Reports (Part 4 of 5)

Amazon interview experiences

  • Amazon Experienced SDE Onsite Questions: 1 Experience
  • Amazon SDE Onsite Interview Questions: 9 Experiences
  • Amazon SDE II and L5 FDE Interview Questions: 4 Experiences
  • Amazon Full-Time OA Problems, Earlier Reports (Part 5 of 5)
  • Amazon New Grad OA Problems: Every Task We Have (Part 3 of 5)
See Amazon hiring insights
Saved
class Solution {
    public int minimumProcessesToDrop(int[] starts, int[] ends) {
        // Write your code here
    }
}
Checking account…