AMAZON OA 2021
Anonymous User
11789

I had my amazon OA and below is one of the questions. Please let me know your approach and what type of problem is it? (Math, greedy etc)
I had hard time figuring out and writing backtracking solution.

It was similar to "shopping options" given 4 arrays and target and need to give all the combination that result in target sum. All items should be picked only once.

for eg - A = [2,3]
B = [4]
C = [2,3]
D = [1,2]
Target = 10
Ans = 4 ways
Explanation:
Since B has only one item so we have to pick it everytime so target-B = 6
All the other combination would be [2,2,1] [2,2,2] [3,2,1] [2,3,1]

Comments (15)