Uber·Software Engineer·Technical Phone Screen
- You have an array of vault sizes and a time limit in hours. A robber can steal up to k units per hour from one vault at a time, and a vault of size v takes ceil(v/k) hours to empty. Find the minimum integer rate k such that all vaults can be emptied within the given number of hours.
- Given a set of integers and a target value, determine whether any subset of the integers sums exactly to the target. Return true or false.
“Classic binary search on the answer, which I did recognize pretty quickly.”