FastPrepWorker Assignment — Skills and Account Affinity
Problems/Worker Assignment — Skills and Account Affinity

Worker Assignment — Skills and Account Affinity

Stripe logoStripe● MediumINTERNONSITE INTERVIEW

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The core task matches the visible report at about 75%. The report describes workload balancing, specialty matching, and priority for workers who previously handled an account. The serialized inputs, specialty OR rule, eligibility before account affinity, choice among historical handlers, input-order ties, skip behavior, and outputs are practice choices. No fourth-part requirements were reported.

Assign support tasks to workers in input order.

Input

  • workers: "name,specialty".
  • tasks: "id,duration,accountId,skills", where skills is a |-separated set of acceptable specialties.

For each task:

  1. Keep workers whose specialty appears in the task's skills.
  2. If any eligible worker has previously handled the same account, restrict candidates to those workers.
  3. Choose the candidate with the lowest accumulated workload; break ties by earlier position in workers.

After assignment, add the task duration to the worker's workload and record that the worker has handled the account. If no worker has a required specialty, skip the task. Return successful assignments as "taskId:worker" in task order.

Practice sequence

  1. Part 1: balance workload
  2. Part 2: add specialties.
  3. Part 3: add account affinity (current).

Function

assignTasksAdvanced(workers: String[], tasks: String[]) → String[]

Examples

Example 1

workers = ["Alice,payments","Bob,risk","Cara,payments"]tasks = ["t1,5,acct1,payments","t2,3,acct2,payments|risk","t3,4,acct1,payments|risk","t4,2,acct3,risk"]return = ["t1:Alice","t2:Bob","t3:Alice","t4:Bob"]

t1 goes to Alice by input-order tie-break. t2 goes to Bob, the lowest-workload eligible worker. For t3, Alice has account affinity and is selected despite a larger workload. t4 requires risk and goes to Bob.

Example 2

workers = ["A,java","B,python"]tasks = ["x,2,c1,ruby","y,1,c1,java|python","z,1,c1,python"]return = ["y:A","z:B"]

x is skipped because no worker has ruby. y ties at zero and chooses A. z requires python, so it goes to B; A's account history cannot override the skill requirement.

Constraints

  • Worker names are unique and every worker has one specialty.
  • Task IDs are unique and durations are non-negative integers.
  • Task skill lists are non-empty and use | as the delimiter.
  • Workers start with workload 0 and no account history.
  • Input order breaks workload ties.
  • A task with no eligible worker is skipped.

More Stripe Onsite Interview questions

  • Render a Task Tree from CSV RowsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Transaction Rule Expression EvaluatorONSITE INTERVIEW · Seen Oct 2026
  • Evaluate Ordered Action RulesPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • WebSocket Load Balancer — Parts 1–5OA · ONSITE INTERVIEW · Seen Sep 2026
  • Rule-Driven Transaction Fraud DetectionPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Account Balance Manager Part 3 - Platform CoverageONSITE INTERVIEW · Seen May 2026
  • Account Balance Manager Part 2 - Reject OverdraftsONSITE INTERVIEW · Seen May 2026
  • Account Balance Manager Part 1 - Calculate TotalsONSITE INTERVIEW · Seen May 2026

Similar questions at other companies

  • Design Authentication ManagerOracle · ONSITE INTERVIEWOracle interview questions
  • Ad Score Scheduler With DelayGoogle · ONSITE INTERVIEWGoogle interview questions
  • Thread-Safe Task Storage and Worker DispatchNuro · ONSITE INTERVIEWNuro interview questions
  • Notification Deduplication WindowGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Helpdesk Ticket ProcessingThe Walt Disney Company · ONSITE INTERVIEWThe Walt Disney Company interview questions
  • Execute Tasks by PrioritySnowflake · ONSITE INTERVIEWSnowflake interview questions
  • 15-Minute Chat Session TrackerOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • LRU Cache with TTLAutodesk · ONSITE INTERVIEWAutodesk interview questions
  • Scheduled Payments with Account AliasesCoinbase · ONSITE INTERVIEWCoinbase interview questions
  • Keyed Bounded Executor ScheduleMicrosoft · ONSITE INTERVIEWMicrosoft interview questions

Interview reports that mention this question

  • Stripe SWE Intern Worker Assignment Onsite: 1 Experience

Stripe interview experiences

  • Stripe SWE Onsite over Two Days: 1 Experience
  • Stripe New Grad SWE Phone Screen and Onsite: 2 Experiences
  • Stripe AI Coding Interview, Experienced SWE: 6 Experiences
  • Stripe SWE Intern Payout Scheduler Phone Screen: 1 Experience
  • Stripe New Grad SWE Onsite and HM Round: 1 Experience
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public String[] assignTasksAdvanced(String[] workers, String[] tasks) {
      // write your code here
    }
}
Checking account…