Reddit / Staff Android Engineer | Phone | Menu Items with given coins

1h call, 10 min introduction, the rest was the following problem that had nothing to do with Android even though the recruiter said "it's 100% android interview":

Input:

  • list of menu items: think of something like List<Map<String,Integer>>, where the key is the name of the menu item and the value is the cost. Example: Popcorn:10, CocaCola:4, Water:2, Coffe:3
  • amount of coin

Output:
return all the possible items you can buy (without repetition) with the given coins.

The problem is also described here

Comments (5)