Optiver·Software Engineer·Technical Phone Screen
- Given n piles of bananas and h hours before the guards return, find the minimum eating speed k (bananas per hour) such that all piles can be finished in time. Each hour you pick one pile and eat up to k bananas from it.
“The key insight is that you're not searching through the piles, you're binary searching on the speed itself.”