As reported: Pinterest phone screen (2025).
This is LeetCode 1723 — Find Minimum Time to Finish All Jobs.
jobs[i] is the time job i takes. There are k workers; each job goes to exactly one worker, and a worker's working time is the sum of its jobs. Find an assignment that minimizes the maximum working time of any worker, and return that minimum.
Example 1
jobs = [3,2,3], k = 3
Output: 3
One job per worker.
Example 2
jobs = [1,2,4,7,8], k = 2
Output: 11
Worker 1: 1 + 2 + 8 = 11; worker 2: 4 + 7 = 11.
Constraints: 1 ≤ k ≤ jobs.length ≤ 12; 1 ≤ jobs[i] ≤ 10^7.
Code runner format: one JSON value per line: jobs, k. Implement minimumTimeRequired(jobs, k); the harness prints the minimum.