Get Min Cores
Reported by candidates from IBM's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
IBM asked this in August 2024, and it's a resource allocation problem that trips up candidates who overthink it. You're given a set of tasks with deadlines and processing requirements, and you need to figure out the minimum number of CPU cores required to complete all of them on time. The trick is that this isn't about scheduling the tasks in a clever order. It's about understanding what "minimum cores" actually means in the context of simultaneous task execution. StealthCoder will have your back if you freeze on the exact constraint interpretation during the live OA.
Pattern and pitfall
This is a greedy problem dressed up as a resource planning question. The key insight is that you need to find the peak concurrent demand. Sort tasks by deadline, then simulate execution: at each moment, count how many tasks need to run at the same time to meet all deadlines. The minimum cores required is the maximum overlap you encounter. Many candidates try to build a full schedule or use dynamic programming when the answer lives in a simpler greedy pass. The edge case everyone misses: tasks that start and end at the same deadline boundary. StealthCoder catches these boundary conditions instantly during the OA and suggests the right simulation loop.
Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.
You can drill Get Min Cores cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.
Get StealthCoderRelated leaked OAs
This OA pattern shows up on LeetCode as meeting rooms ii. If you have time before the OA, drill that.
You've seen the question.
Make sure you actually pass IBM's OA.
IBM reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Get Min Cores FAQ
Is this a scheduling problem or a math problem?+
It's greedy simulation. You don't need to build an optimal schedule. You just need to find the instant where the most tasks overlap. That maximum overlap is your answer. Think peak demand, not task order.
What's the most common mistake candidates make?+
Assuming you can move tasks around freely to reduce core count. You can't. Deadlines are fixed. Your job is to measure the worst-case simultaneous load, not optimize the schedule itself.
How do I handle tasks with the same deadline?+
They all need to run by that deadline. If multiple tasks end on the same day, they may or may not overlap depending on their start times. Simulate minute-by-minute or use an event-based sweep. Don't hand-wave it.
Should I sort by deadline, start time, or duration?+
Sort by deadline first. Then sweep through time and count overlapping intervals. A deadline sort gives you the natural order to process task dependencies and peaks.
Can I solve this in 15 minutes cold?+
Yes, if you recognize the pattern. Greedy interval overlap problems are standard. Code a deadline sort, loop through time, count active tasks at each point. That's your minimum cores.