IBM Senior Principal coding interview questions
These are the 3 coding questions YourAlly has tagged for IBM at Senior Principal. Senior Principal is the common India title for this level. YourAlly treats it as Senior staff, the same level as Google L7, Meta E7 and Amazon L8.
A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level coding is often a smaller part of the loop, but the bar for clarity and speed stays high.
Practice a mock IBM Senior Principal coding loopPractice IBM coding questions
Simulate Batch Initiators With DependenciesFree to read
A batch system runs jobs on a fixed number of initiators. A job can start once all its prerequisite jobs have finished. At time 0 and every time jobs finish, each free initiator takes the ready job with the smallest name. Given jobs, durations, dependency pairs [a, b] meaning a waits for b, and the initiator count, return the time the last job finishes, or -1 if some job can never run.
Input: jobs = [extract,sort,report,backup], durations = [3,2,4,5], deps = [[sort,extract],[report,sort]], initiators = 2 Output: 9
What a strong answer covers
- Event-driven simulation, not minute-by-minute
- Two heaps: ready by name, running by finish time
- Simultaneous finishes released before assignment
- Cycle reported as -1
- O((V + E) log V) time with 64-bit finish times
2 more coding questions
- Count Wildcard Topic Subscription Matches Locked
- Find the First Deadlock in a Lock Trace Locked
Related pages
IBM coding at other levels
Other companies at this level
- Adobe Senior Principal 4 questions
- Amazon Senior Principal 6 questions
- Apple Senior Principal 7 questions
- Cisco Senior Principal 3 questions
- Google Senior Principal 14 questions
- Intel Senior Principal 3 questions