Software Engineer • Intern
Software Engineer • Intern
High QualityPrep Other Coding Questions Asked by IBM
Continue with targeted prep from IBM's coding question bank.
Interview Summary
The IBM online assessment contained two coding questions. The first was an inventory-based revenue problem where customers always select the currently most expensive VM type, while the second focused on minimizing character replacements so that no two adjacent letters in a word are identical. Both questions were relatively straightforward implementation problems, with the first emphasizing repeated maximum selection and the second emphasizing careful handling of consecutive duplicate characters.
Interview Details
Question 1 — Dynamic VM Rental Revenue
A cloud platform has n different VM types, and each type has a certain number of instances currently available. Customers arrive one at a time, and each customer rents exactly one VM. The price paid for a VM is equal to the remaining inventory of that VM type at the moment of purchase.
Each customer always selects a VM type with the highest current stock. If multiple VM types are tied for the maximum inventory, any of them may be selected.
Unlock Full Details
Create a free account to unlock this interview experience report.