1 like 0 dislike
5,157 views

edited | 5,157 views

0 like 0 dislike

Telephonic:

Round 1

Round 2

1. Find the number of islands (all 8 corners)

2. Dont remember

Round 3

1.word frequency of a stream of words (no code required, explain trie method)

Round 4

1. Next larger element (use stacks)

Time and space complexity must for all questions
Start from brute force and go to optimized solution.
All edge cases are to be covered in code?
Think out loud all the time (so that even when questions are easy they will catch your thinking with greater importance)

by Expert (19,470 points)
0 like 0 dislike

Hi, Recently i was interviewed for Amazon SDE-1 Position in Hyderabad.There a telephonic round followed by 4 F2F rounds.

Telephonic Round:
1. Inserting an element into a BST
2. A array is increasing and then decreasing find the point where it stops increasing.

F2F Round 1:
1. Replace all the elements in the array with its next highest element to its right
Expected O(n) Solution.

2. Given a binary tree and a value k. A path is called heavy path if the sum of the elements in the path (path from root to leaf) > k remove all the paths from the tree which are not heavy i.e., tree should contain only heavy paths.

F2F Round 2:
1. Given a array find all the triplets which satisfy the triangle preoperty(sum of 2 sides should be greater than third side)
Sol: sort then o(n^2 log(n)) using binary search.

2. Given a dependency where for example process p1,p2,p3
p1:{p2,p3}
p2:{p3}
p3:{}
This means p1 starts once p2 and p3 are complete
p2 starts p3 is complete
p3 can start as it does not have any dependence.
Figure out strategy to find the order of execution of processes.
Ans:Topological sorting.

F2F Round 3:
1. Design a stack with push pop and find min operations in o(1) time.
Ans:can be done using 2 Stacks

2. Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words.
Solution https://www.geeksforgeeks.org/dynamic-programming-set-32-word-break-problem/

F2F Round 4:
Discussion of projects and current work experience.
Diameter of a binary tree in o(n).
First devised o(n^2) then optimized to o(n)

by Expert (19,470 points)
0 like 0 dislike

Hi, Recently I was interviewed for the SDE-I for Amazon, Chennai.

Round 1(Online Round):
e.g 1–>2–>3
3–>4
Output: 1–>5–>7

I cleared the online coding round and I was asked to come down for the face to face discussions.

Round 2(F2F):
1. Find if the given binary tree is height balanced.

Round 3(F2F):
1. Find if the given tree is the subtree of the big tree.
2. Given a sorted matrix (row-wise and column wise) , find kth smallest element.
3. Given an array. Pop min element in O(1) time.
4. Implement increment operator for the array.

Round 4(F2F):
1. Print the level-order traversal from bottom to up in a given binary tree.
2. What is process and thread?
3. What is copy constructor?
4. Design parking lot.

Round 5(F2F) (Hiring manager round):
1. Questions on achievements, challenges faced, area of improvement.,etc.
2. Given a file with millions of URLs. Some URLs repeating , some unique. Find the first unique URL.

Coding was required in each and every round. Think loud. Tell the interviewers what you think. Give them different approaches. Be confident about your solution.

by Expert (19,470 points)
0 like 0 dislike

Hi, Recently i was interviewed for Amazon SDE-1 Position in Hyderabad.There a telephonic round followed by 4 F2F rounds.

2. Given a array find whether it is majority array or not.
Complexity: O(n) Space complexity O(1)

F2F Round 1:
1. Given a dependency where for java packages p1,p2,p3
p1:{p2,p3}
p2:{p3}
p3:{}
This means p1 can be compiled when compilation of p2 and p3 done
p2 can compile when p3 is compiled
p3 can start as it does not have any dependence.
Figure out strategy to find the order of compilation of processes.
Ans:Topological sorting
2. Discussion on project
Asked all concept related to my final year project.
3. Current project in company
Challenges faced at company

2F Round 2:
1. Given a binary tree print its side view from left from bottom to top and right side view as up to downward .
Eg. For image 1 output will be 3, 1, 2, 5, 6, 7, 8

and for Example 2( image 2) output should be C, B, A, D, F, I, L

3. What is virtual memory?
4. What is paging in OS?

2F Round 3:
1. Why are you looking for change in 6 months of experience .
2. Discussion on how to send notification to friends when a user post on social network like facebook
The discussion was on when to load friend list of user and he was expecting we should load friend list when user login.

2F Round 4:
1. Discussion on current project challenges faced
Situation when you have to take decision in absence of your team lead/Manager
2. Why are you looking for change in 6 months of experience

3. Given a special binary tree structure given in image 3 A node have 3 node pointers left,right and nextTwo adjacent node share there left and right as shown in treeGive tree whose node are set with next pointer as null.
you have to set the next pointer as shown in the figure .
If any node is null then the next of its prev node should be next of that eg. a -> b -> c (a’s next is b ,b’s next is c) if b is null then a’s next should be c.

4. What is virtual memory?
5. What is segmentation fault?

Note :- They expect fully working code in all round.

Tips:
1. Think loud they always support you
2. Ask for hint if not getting.

by Expert (19,470 points)
0 like 0 dislike

Recently I am interviewed for Amazon SDE-1 position for Bangalore. There are 3 F2F rounds followed by a telephonic round.

As it was a drive, they asked everyone to write code for these problems
2. Longest Palindrome in a String

1st F2F:
1. Why do you want to leave your current company?
2. Why Amazon?
3. Find median in a stream
I told him min heap & max heap method, then he asked me who can you do it using trees.
4. There is a mxn matrix which contains only 1 & 0’s. You have to print the unique rows. I solved it using tries, then he asked why cannot I use hash map and asked to write the code using tries.
2nd F2F (Managerial Round):
1. Why Amazon?
2. Why leaving your current company so early?
3. Areas of Improvement , strengths & weakness
4. Given a prefix expression , convert into prefix tree and extended the qtsn for infix expression, time complexities etc.
5. Given a dictionary , and we have to query for anagrams for the word. extended the qstn to while typing the word we have to provide the autotype. Gave him a solun using tries.

Telephonic Round (Bar Riser):
1. Why Amazon?