Skip to content
Related Articles

Related Articles

Improve Article

Amazon Interview Experience for SDE-1 | 6-Months Intern (On-Campus)

  • Difficulty Level : Medium
  • Last Updated : 04 Nov, 2020

Round 1: An online assessment that consisted of four parts:

  • Code Debugging: 7 questions to be debugged in 20 minutes. (easy-medium)
  • Coding Test: 2 coding questions to be solved in 70 minutes. (medium)
  • Workstyles assessment: 20minutes
  • Reasoning ability: 35 minutes (easy-medium)

38 members were shortlisted for the interviews.

Round 2: It was a technical interview for 1 hour. The interviewer gave her an introduction and asked about me. Then I was given the following questions.

  1. Asked me to discuss the time and space complexity of my approach and then to code.
  2. I was able to solve this easily and discussed the time and space complexity.

Around 12 members were shortlisted for TR-2

Round 3: It was a technical interview for 1 hour.  After a brief introduction the interviewer asked the following question: 

  1. Given a binary tree, return the sum of all the nodes whose Kth parent (Kth ancestor) value is even. Where 0 <  K < 10^7.


       /   \
      2     3
     / \     \
    4   5     7
     \       /
      6     1
    • The 2nd ancestor of 4 , 5 ,7 is 8 and 8 is even
    • The 2nd ancestor of 6 is 2 and 2 is even
    • The 2nd ancestor of 1 is 3 and 3 is odd

    So the answer is 4 +5 +7+6= 22

    First I gave an n^2 solution, and he asked to optimize it. Then I came up with a nlogn solution (for the balanced binary tree).

Finally, I wrote a code with linear time complexity using post-order traversal.



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 :