Amazon Intern Interview questions

Amazon Internship Interview Round 1

  1. There are two urns A and B and an equal number of red balls and blue balls.How do u place the balls in the urns such that the probability of picking up the red ball is greater?

  2. Two trains enter at the opposite sides of a tunnel of length L with speeds 'V'. A particle enters the tunnel at the same time with a speed 'v' and it vibrates in the tunnel[i.e. if it reaches the end of the tunnel then it comes back]. What is the position of the particle by the time the 2 trains meet?

  3. Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

  4. How do you kill a process?

  5. What is the functionality of a top command?

  6. Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?

  7. Design a datastructure to represent the movement of a knight on a chess board

  8. Write an algorithm to traverse a knight covering all the squares on a chessboard starting at a particular point.

Click here for the solutions

Amazon Internship Interview Round 2

  1. Why do you like to work with us?

  2. What work are you expecting?

  3. Tell me about any of your experience