Amazon Interview Question
Software DevelopersTeam: India
Country: India
Interview Type: Written Test
Maybe I don't read this question correctly: it looks like the issue is for generating an array, in which each item represents a student and contains number of gifts he owns. (1) initially every item contains 1 {1,1,1,1,1}; (2)for a given array sized M, if A: number of any item's value either < 0 or > M, or B:sum of number of each item !=M; then the array is invalid.
{}
- Anonymous May 07, 2019