Skip to content
Related Articles

Related Articles

Improve Article
Amazon Interview | Set 123 (On-Campus for Internship)
  • Difficulty Level : Medium
  • Last Updated : 24 Jun, 2019

Online round: In this round there were 20 MCQ’s to solve and 2 coding question. Of the 20MCQ’s a couple of questions were on Quantitative aptitude, relationships, OS, DBMS, Data structures etc. there was negative marking for every wrong answer so I attempted only 15 for which I was sure.

Q1- find the first non repeating character in a string.

Q2- given a binary tree where each node has some weight. You have to return the max weight in the binary tree.
Maxweight = value of root node + value in its left subtree and right subtree.

Ex  - 2
   /   \  
  -1    3
Output = 4 

1st round(50 mins):
Q1. Reverse link list in k chunks
Interviewer was first interested in approach then he asked me to code.

Q2. Spiral order traversal of binary tree
I first told him 2 stack approach but he asked me to do without stack .Then I gave him a solution using one queue and one stack and he finally asked me to code both the approaches.



Q3. Longest palindromic substring
I first used DP but he asked me to do O(1) space complexity. I was unable to do so.

2nd round :
Q1. Connect sibling pointer in a binary tree
Connect Nodes at Same Level
https://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/

Q2. Push ,pop and min operations in O(1)

He asked me to do middle operation also and then he asked me to code 2nd problem.
https://www.geeksforgeeks.org/design-a-stack-with-find-middle-operation/

Q3. Given n point in a 2d plane ,find k distant nodes from the origin.
I told him min heap approach and he was satisfied.

Q4. Problem statement was very long but it was topological sorting.

I used adjacency list representation, he asked me why
And finally asked me to code it.

Overall it was a very nice experience interviewing with them.

Some tips:

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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :