Campus Drive Experience: Amazon


    , Inc. is an American multinational electronic commerce company with headquarters in Seattle, Washington, United States. It is the world’s largest online retailer. started as an online bookstore, but soon diversified, selling DVDs, CDs, video and MP3downloads/streaming,  software, video games, electronics, apparel, furniture, food, toys, and jewelry. The company also produces consumer electronics—notably the Amazon Kindle e-book reader and the Kindle Fire tablet computer—and is a major provider of cloud computing services.


To Know more about AMAZON, visit Amazon India

Basic Information

Foundation date 1994
Headquarters Seattle, Washington, U.S.
Area served Worldwide
Founder(s) Jeff Bezos
Key people Jeff Bezos
(Chairman, President & CEO)
Industry Internet, online retailing
Products A2Z Development,,  Alexa Internet,,  Amazon Kindle,  Amazon Studios,   Amazon Web Services,,,,  IMDb,   LoveFilm,   The Book Depository,,  Woot,,,,  askville
Website (original US site)
various national sites
Written in C++ and Java
Launched 1995


Placement experience 2011 campus drive is as follows,

Round1: Written Test /Online

[Learn: DS, C, General Aptitude and Logical reasoning]

No of questions: 20+2      Duration: 90 min       Negative marks: 1/3

The written test consists two sections. First section has 20 multiple choice questions from DS, OS, C, quantitative aptitude and Logical reasoning. In programming section, they asked to write a code for the given problem and we can use the online compiler (C, C++ or Java).

Section I – MCQ Section

1. There are n steps. A frog can climb those steps either jumps in 1 step or2 steps or 3 steps. Which of the following recursion can be used to find the total number of ways to climb those steps?

a. f(n)=f(n-1)+f(n-2) if f(1)=1 f(2)=1

b. f(n)=1+f(n-1)+f(n-2)+f(n-3) if f(1)=1 f(2)=2 f(3)=4

c. f(n)=f(n-1)+f(n-2)+f(n-3) if f(1)=1 f(2)=2 f(3)=4

2. const char*p;

const * char q;

Which of the following is true about above statements?

a. *p=.A. is illegal

b. p=”hello” is legal;

c. *q=.A. is legal

d. All the above

3. int main()


int x[]={1,2,3,4,5};

int u;

int *ptr=x;




return 0;


what statement should come in place of ???? to get the following output? 1-2-3-10-5-

a. *ptr + 3=10

b. *ptr[3]=10

c. *(ptr+3)=10

d. *(ptr)+3=10

4. Which of the following statement can be used to check the 20th bit of given number (n) is ON or not?

a. n AND 0xfff0000 should be equal to 0x00010000

b. n AND 0x000080000 should be equal to 0x00008000

c. n OR 0xfffff000 should be equal to 0x00001000

d. n OR 0x000080000 should be equal to 0x00008000

5. What happens when the parent process gets killed?

a. Child process also killed

b. Child process become Zombie

c. Child process are adopted by init(1)

d. Continues to run changing its parent as the process at the root of the process hierarchy

6. Which of the following is correct?

a. Hash table entries increases, collisions increases.

b. Recursion is efficient

c. The worst case of quick sort is o(n2).

d. Binary search using a linked list is efficient.

7.  what does the following code imply?

Reverse (s,i,j) –reverse the elements in array s from i to j





8. void fun(int a,int b)




If(c==0) return b;





What does this above code does?

9. if |x|>|x+1| find x.

a. ½

b. undefined

c. -1/2

d. -1<x<-1/3

10. Maximum sized packet that can be transported as in IP specification.

a. Smallest MTU between source and destination links

b. Maximum packet size of Transport layer protocol

c. Fixed to 64KB

d. Configured at command line

11. Consider 2 arrays

array1 sorted in ascending order {1,2,…n}

array2 sorted in descending order {n,n-1,…1}

Let C1 and C2 be the number of comparisons done in quicksort for both the

respective cases

Which is correct?

a. c1>c2

b. c1<c2

c. c1=c2

d. Can.t say for arbitrary n

12. A microprocessor takes 4.5micro seconds to respond to an interrupt. Let I1,I2,I3 represents the interrupt.

I1 serviced in 25microseconds

I2 serviced in 35microseconds

I3 serviced in 20microseconds

The priority of I1 is the highest and I3 is the lowest. Now predict when will I3 gets serviced.

13. Hash tables can contribute an efficient average case solution to all except,

a. Counting distinct values: set of n keys, determine number of distinct

key values

b. Dynamic dictionary: support insert, search and delete

c. Range search: Given a range a and b find all possible records whose

key value is in (a,b)

d. Symbol table look up

14. Most efficient data structure to implement pop, push, find min with no extra space takes,

a. O(1),O(1),O(n)

b. O(1),O(n),O(1)

c. O(n),O(1),O(1)

d. O(1),O(1),O(1)

15. int main()


int a[5]={1,2,3,4,5};

int *ptr=(int*)(&a+1);

printf(“%d %d”,*(a+1),*(ptr-1));


What is the output?

a. 2,2

b. 2,5

c. 2,1

d. none

16. There 6 pop songs, 5 rock songs and 3 folk songs. How many albums can be created that contains at least one pop song and rock song?

17. When a ship is 50km away from seaport, ship get started leaking. It stay can stay only 20 minutes above the water. It can only at the speed of 15kmph. To rescue passengers to rescue boat takes 4 minutes. In which speed the rescue boat should come from seaport to save all passengers?

Section II – Programming Section:

1. Given a tree.

Ex: 1

2 3

4 6 7


In some situations, diameter of the tree is always largest of following Length of path from and to the leaves through root.

Diameter of left sub tree

Diameter of right sub tree

Write a code to find the diameter of the tree

2. There are M*N chocolate moulds. Some moulds may contain chocolate and some may be empty. The time taken by bacteria to infect the neighbouring moulds is 1 minute. The infected moulds then infect its neighbouring moulds again. Given a position where the bacteria infects the moulds, find the time

taken to infect all the moulds. Some moulds containing chocolate may be isolated from the other. In that case, it is impossible to infect that. At that time, the program must return -1;




This is 2*2 chocolate moulds. Given the bacteria position at (1,1) i.e the first one , the time taken is 1 minute


Company Information Source: Wikipedia

If you find this site useful, please support us. Like our FaceBook Page. You can also contact us by mail :

Tagged: , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: