Smallest Node Capacity to Pack Ordered Batch Jobs Onto K Nodes
Last updated: November 29, 2026
Quick Overview
Given batch job sizes that must stay in submission order and be split into at most k contiguous groups (one per node), return the smallest per-node capacity that makes this possible.
IBM
November 29, 20260
0
0 solved
Given batch job sizes that must stay in submission order and be split into at most k contiguous groups (one per node), return the smallest per-node capacity that makes this possible.
IBM Workload Scheduler and Spectrum LSF style batch systems assign ordered job streams to nodes, and minimizing the largest node load is a binary-search-on-the-answer question asked in IBM onsites. The interviewer checks that you identify a monotone feasibility check and set the search bounds correctly.
What the Interviewer Expects
- Recognize the monotone yes or no feasibility predicate
- Set low to the largest job and high to the total
- Write a greedy feasibility check
- Binary search for the first feasible capacity
- State O(n log S) complexity
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you also output the actual split points?
- What if nodes have different speeds?
- Can you solve it with DP, and why is binary search better here?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: list jobs of positive integers and integer k >= 1. Output: minimum capacity C such that the jobs can be cut into at most k contiguous segments each summing to at most C. Order must be prese...
High-Level Design
If capacity C works, any larger C works too, so feasibility is monotone. The answer lies between max(jobs) (each job must fit somewhere) and sum(jobs) (one node takes everything). For a candidate ...