Amazon Placement Paper - 2


Coding:

1st) Reversing a linked list k elements at a time.

2nd) Array of integers was given with part of it sorted in ascending order and a part in descending order (one part following the other)we have to apply binary search on this array to find out a given number.

Third round: technical interview.

- Program to find out square root of a float without using any library function.

- Array of 1's and 0's is given we have to find out subarray of size k with most number of 1's and most number of 0's respectively.

- Question on time and space complexity (find time and space complexity of given code).

- Question on bitwise operators in c (how to set, reset, toggle given bit).

On a 2 lane road, some cars move in upward direction and some in downward. Speed of cars were given along with their arrival time at a specific point on a road, we have to write a program to find out length of each car and % of cars moving in upward and downward direction.