Amazon Interview Questions – 2015

e046237a8d5f4a7482704e67e2072b1a
0

Round 1:

Salary: 28 lakh (It includes joining bonus,stock options and other variable pay)

20 Objective + 2 Coding Question.

(C, OS, DBMS, Networking)

Question 1:

Generate the following pattern when x is given up to Nth terms.

For ex

Input: x=2, N=5

OUTPUT:

2

12

1112

3112

132112

Question 2:

Find the next higher no. Of x whose binary represent does not contain consecutive 1s-

For ex:

Input:

12

Output:

16

 

ROUND 2:

3 Coding Question and Project Discussion:

Question 1:

Write a C program that, given an array A [] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x.

Question 2:

Write an efficient program for printing k largest elements in an array. Elements in array can be in any order.

Question 3:

Given an unsorted array in which every adjacent element is differ by either +1 or -1

Write an efficient code to find x where x is also given.

Round 3:

1 Question (tree) +project discussion.

Find the lowest common ancestor of given n nodes in given binary tree. Nodes are given in array of size n.

Expected time complexity O(n) and space complexity O(1)

Round 4:

  • Tell me about yourself.
  • Strength, weakness
  • Project discussion.
  • Coding Question: find nth node from the end of linked list.

Round 5:

All questions related to Operating Systems and project

  • Implement LRU cache where searching complexity will be O (1)?
  • What is multithreading; apply it on the implemented cache.
  • What is critical section relate it with this code? How to solve the problem of critical section.
  • Difference between semaphore and mutex.
  • Project Discussion.

Thank you.

Blog Author

Follow :

Related Blogs