Sunday common C++ interview problem: Monkey eating bananas.
Given the count of bananas in piles and the number of hours before the monkey is discovered, return the most leisurely eating speed (bananas per hour) so that the monkey can consume all bananas before it is discovered.
The monkey will only eat from one pile each hour.
Solve it yourself: https://compiler-explorer.com/z/9nq77e7ad
Solution: https://compiler-explorer.com/z/Y7co1f4rr
@simontoth
Unless the employer actually trains monkeys to eat bananas it would be at this point I'd walk out of the interview and politely thank them for wasting my time.