Open In App

Amazon Interview Experience | Set 156 (On-Campus)

Improve
Improve
Like Article
Like
Save
Share
Report

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”
3

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.

         10
        /   \
       5    8
5-10-8 has two turns
     10
     /  \
   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.


Last Updated : 09 Aug, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads