Apple | Phone Screen | SDE 2
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2023-02-07Added By Anonymous
Source: Link
Company: Apple
Role: SDE 2
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Give a bag with value 500 and a set of candies with values:
Hersheys - 200
MM - 100
Godiva - 300
Print all the possible permutations and combinations in which the bag can be filled. Each candy can be picked any number of times.
Example Output:
[[H, G] , [H, MM, MM, MM], ...]]