Amazon Interview Experience | Set 156 (On-Campus)

Written Round:
There were 21 MCQs and 2 coding questions hosted on hackkerank.
Time: 1 hr 30 mns.
The MCQs were from c, c++, os, networks for example
1. LDAP stands for?
2. 2^30+2^30+2^30+2^30 =?
3. Given three process P, Q, R . P requests resources A, B, C, Q requests B, C, D and R requests C, D, A which of the following orders is deadlock-free
4. Given a postfix expression find the value of expression
5. Which of the following is the inorder traversal for the given preorder traversal
6 Question-based on the precedence order of operators

Coding questions:
1) Given a graph. Find if a cycle exists and print the nodes in the cycle. If multiple cycles exists print the cycle starting from the lowest index

2) Given a string S and a string T, count the number of distinct subsequences of T in S.
S = “rabbbit”, T = “rabbit”

Interview 1:
1) Find the diameter in given tree which can start at any node and can end
at any node and should have only single turn.

        /   \
       5    8
5-10-8 has two turns
     /  \
   45   56
   / \    \
  10  20   45 

10-45-10-56-45 has 1 turn
20-45-10-56 has 2 turns

2) Find the number of islands

Interview 2:
1) Word Break Problem
2) Find if an array of strings can be chained to form a circle
3) What datastructure will you use for designing lift
4) Efficient data structure for minimsing the following operations if we have an array arr[0 . . . n-1].
a) Add a value x to array from index l to r where 0 <= l <= r <= n-1
b) Find the value of a specified element of the array arr[i] where 0 <= i <= n-1.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.