Amazon Interview Report
- 0of 0 votes
AnswerGive an N-length array with only 0 and 1 inside
- ajay.raj May 01, 2018 in United States
Requires to find the minimum number of conversions needed to convert the array to 0 before all 1.
The conversion is to change a 0 to 1 or a 1 to 0,
And the number of 0 and 1 in the converted array can be arbitrary.
Just find the minimum conversion step| Report Duplicate | Flag | PURGE
Amazon SDE1 - 0of 0 votes
AnswersGiven an array, find an x such that all numbers less than x are equal to themselves. Numbers greater than it are equal to x, and all numbers add up to a target
- ajay.raj May 01, 2018 in United States
For example, [1 3 5 7 9] target=24, answer is8. Because when x=8, the array has only 9>8, so 1+3+5+7+8=24 is the closest to the target.| Report Duplicate | Flag | PURGE
Amazon SDE1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.