Amazon Total Interview Process

There Are 3 Rounds In The Interview Process:

1) Technical Aptitude Test.2) Coding Round.3) Technical Interview

1) Technical Aptitude Test:

It comprised of 20 technical objective questions and two programs to be solved in 1 HR 30 mins. Most of the questions were on OS. I am mentioning few questions here.1. Question on fork() system call.Code was given with few forks we were asked to find out number of child processes and how many times a given printf statement will be executed.2. C language question Dangling Pointers .We were given 3 Functions and we have to find out which function call will result in Dangling Pointer.3. A Numerical on 2-level page table in OS.4. Question like which of the following is used by Java.A) NFAB) DFAC) PDAD) Turing Machine5. Question On Threads.Which portion is shared between Process and Threads (Code section, Processor register etc).6. Question on Tree.Preorder traversal of a BST was given we have to find out its postorder traversal.7. C Language question on Format Specifier.Like which of the following is not a Format specifier.8. Java question on String Concatenation Operator (+) inside System.out.println();9. Mix of Printf and Fork was given and we were asked the output.10. Page reference string were given and we have to find out number of page faults inFIFO, LRU and optimal page replacement policy.11. Question on thrashing from OS.I don't exactly remember other questions but most of them were from OS.2 programs.1st)An array containing mix of +ve and -ve numbers were given and we have to arrange those numbers so that final array has alternating +ve and -ve numbers but without changing the original order.2nd)program based on keypad of a Mobile.keypad has keys with each key having few digits and alphabets on it.A number was given say 235 then we have to write a program that finds all permutations of alphabets while typing 235 like adj, adk, adl and so on. Without changing the original sequence.

2) Coding Round:

2 Programs for 1 Hr.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.

3) 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).2 Lane road was given some cars moving in upward direction and some in downwardspeed 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.