Answer: Dunzo SDE OA (2022) | Job Scheduling, Binary Search on Answer, and Backtracking

Answer · Posted Jun 2026

Approach This problem is a combination of: Binary Search on Answer Backtracking Pruning Instead of directly finding the optimal assignment, we binary search the answer. For a candidate maximum workload limit, we check: Can all jobs be assigned so that no worker exceeds limit? If yes: Try a smaller answer. Otherwise: Increase the limit. Key Observation The answer lies between: Minimum Possible max(jobs) because the largest job must be assigned to some worker. Maximum Possible sum(jobs) when a single worker ...

The full answer & interview discussion are available to premium members.

Log in Create a free account