Apple | Phone Screen | SDE 2

Anonymous User
1858
Feb 07, 2023

Give a bag with value 500 and a set of candies with values
Hersheys - 200
MM - 100
Godiva - 300

Print all the posible permutationd and combinations in whihc the bag can be filled. Each candy can be picked any numer of times.

Example Output :
[[H, G] , [H, MM, MM, MM], ...]]

Comments (5)