Amazon Interview Report
- 0of 0 votes
AnswersGiven vector<int> nums, and pair<int, int> range. Find out how many continuous subsequences within this vector sum up the number within the range.
- ajay.raj April 08, 2018 in United States
Input: [1, 2, 3], [3,6]
Output: (4)
because [1,2,3], [1,2], [2,3], [3]| Report Duplicate | Flag | PURGE
Amazon Software Developer - 0of 0 votes
AnswersGiven an vector<int> nums and an int target, you can change any element of the vector to positive or negative. How many uniquely different vector sum up to target?
- ajay.raj April 08, 2018 in United States
Input: [1,1,1], target = 2
[-1,1,1]
[1,-1,1]
[1,1,-1]
return (3)| Report Duplicate | Flag | PURGE
Amazon Software Developer - 0of 0 votes
AnswerEach have a (x,y) coordinate.
- ajay.raj April 08, 2018 in United States
Write an API that group three Googler together for lunch if they are close enough. Otherwise, throw them in un-schedule pool.
Distance formula = sqrt((x1-x2) ^2 + (y1-y2) ^2)
Given an int range;
Range: 2
Input | Output of API Un-schedule pool
0,0 -> [] [[0,0]]
1,0 -> [] [[0,0], [1,0]]
3,0 -> [] [[0,0], [1,0], [3,0]]
1,1-> [[0,0], [1,0], [1,1]] [[3,0]]| Report Duplicate | Flag | PURGE
Amazon Software Developer