FastPrepThree-Stage Labeling Workforce Simulation
Problems/Three-Stage Labeling Workforce Simulation

Three-Stage Labeling Workforce Simulation

Scale AI logoScale AI● HardNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Scale AI phone screen. Our version keeps three tasks in a row, workers who can do only one task at a time, no worker repeating a task, greedy assignment, activities with timestamps, and the total time. The report accepts several valid greedy schedules. A later report adds a different duration for each worker. We chose that ties go by input order and that the log is combined into strings. Our version is about 92% the same as the reported question.

Customer tasks pass through sequential stages L0 → L1 → L2. A task is complete after its L2 work finishes.

Given task IDs, worker IDs, and each worker's positive integer duration per stage, simulate the process.

  • A task stage has at most one assigned worker, and a worker handles at most one stage at a time.
  • A worker may never work on the same task twice, even at another stage.
  • At a timestamp, process all completions in worker input order, then assign idle workers in worker input order.
  • For an idle worker, greedily choose the first task in task input order whose current stage is ready, unassigned, and not previously handled by that worker.
  • After assignments, jump to the next completion timestamp.

Return an event log. Each line is time ASSIGN worker task Ls or time COMPLETE worker task Ls. Append TOTAL time after all tasks finish.

Function

simulateLabelingWorkforce(tasks: String[], workers: String[], durations: int[]) → String[]

Examples

Example 1

tasks = ["A"]workers = ["X","Y","Z"]durations = [1,1,1]return = ["0 ASSIGN X A L0","1 COMPLETE X A L0","1 ASSIGN Y A L1","2 COMPLETE Y A L1","2 ASSIGN Z A L2","3 COMPLETE Z A L2","TOTAL 3"]

The no-repeat rule forces three different workers across the three stages.

Example 2

tasks = ["A","B"]workers = ["X","Y","Z"]durations = [1,1,1]return = ["0 ASSIGN X A L0","0 ASSIGN Y B L0","1 COMPLETE X A L0","1 COMPLETE Y B L0","1 ASSIGN X B L1","1 ASSIGN Y A L1","2 COMPLETE X B L1","2 COMPLETE Y A L1","2 ASSIGN Z A L2","3 COMPLETE Z A L2","3 ASSIGN Z B L2","4 COMPLETE Z B L2","TOTAL 4"]

This is the schedule produced by the greedy assignment rules.

Example 3

tasks = ["A"]workers = ["X","Y","Z"]durations = [2,1,3]return = ["0 ASSIGN X A L0","2 COMPLETE X A L0","2 ASSIGN Y A L1","3 COMPLETE Y A L1","3 ASSIGN Z A L2","6 COMPLETE Z A L2","TOTAL 6"]

The workers' different durations determine the completion timestamps.

Constraints

  • 1 <= tasks.length <= 1000.
  • 3 <= workers.length <= 1000.
  • workers.length == durations.length.
  • Task and worker IDs are unique nonempty alphanumeric strings.
  • 1 <= durations[i] <= 1000000.
  • The stated constraints guarantee the greedy simulation can finish.

More Scale AI Phone Screen questions

  • Four-Player Trick-Taking Card Game SimulationOA · PHONE SCREEN · Seen Aug 2026
  • Task Processor: Dependencies and DeadlinesPHONE SCREEN · Seen Aug 2026
  • Best Poker Category with a JokerPHONE SCREEN · ONSITE INTERVIEW · Seen Jun 2026
  • Free Time for Every Meeting RoomPHONE SCREEN · Seen Apr 2026
  • Free Windows Between Busy IntervalsOA · PHONE SCREEN · Seen Apr 2026
  • Order Queries by Shortest Processing TimePHONE SCREEN · Seen Apr 2026
  • Party Time by Town and Quiet Gaps by CityPHONE SCREEN · Seen Jan 2026
  • Party Windows and Dead Zone TimePHONE SCREEN · Seen Oct 2025
  • Overlap Duration of Two Time IntervalsPHONE SCREEN · Seen Jun 2025
  • Multi-Head Attention BlockPHONE SCREEN · Seen Mar 2025

Similar questions at other companies

  • Combine the Two Smallest Until All Reach kAdobe · PHONE SCREENAdobe interview questions
  • API Shield with Two Rolling LimitsGraviton · OA
  • Team-Preferred Stable MatchingBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
  • Streaming Ingredient DishesHarness · ONSITE INTERVIEW
  • Ad Rotation Scheduler With CooldownGoogle · ONSITE INTERVIEWGoogle interview questions
  • Durable Work Queue OperationsOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Dynamic Least-Loaded Job DispatcherCresta · PHONE SCREENCresta interview questions
  • Greedy and Beam Sentence DecodingMicrosoft · PHONE SCREEN · ONSITE INTERVIEWMicrosoft interview questions
  • Text JustificationUber · PHONE SCREENUber interview questions
  • Key-Value Store GET and PUT QPSDatabricks · PHONE SCREENDatabricks interview questions

Interview reports that mention this question

  • Scale AI New Grad SWE and MLE Question Bank

Scale AI interview experiences

  • Scale AI OA: What It Tests (2026)
  • Scale AI Forward Deployed Engineer Debugging Round: 1 Experience
  • Scale AI ML Research Engineering Intern Interviews: 1 Experience
  • Scale AI SWE Intern Debugging Interview: 9 Experiences
  • Scale AI New Grad SWE Poker Screen and Onsite: 1 Experience
All Scale AI interview questionsSee Scale AI hiring insights
Saved
class Solution {
    public String[] simulateLabelingWorkforce(String[] tasks, String[] workers, int[] durations) {
        // write your code here
    }
}
Checking account…