Amazon | Applied Scientist Intern | Bangalore | Jan 2022 [Reject]
Anonymous User
1565

Recently my interview was scheduled and I got rejected.

Round 1 - DSA Round

Interviewer asked me total 3 questions.

  1. Check if binary tree is BST or not? (To give some confidence).

  2. Given lists of linked lists and you have to sort in minimal time comlexity.
    e.g - [[1->2->3], [4->18], [10->12->15->20]] you have to merge and pass single head where the results look like - 1-> 2-> 3-> 4-> 10-> 12->15->18->20.

  3. Given 2d array of 0's & 1's you have to find minimum no. of swaps required to bring all 1's in k*k box where k*k is the total no. 1 present in the 2d array.
    e.g n= 3 and k=2
    1 0 0
    1 0 1
    0 1 0

So, if we look first 2*2 matrix there are 2 1's already there so we need only other 2 1's.
ans = 2.

I was able to solve 2 questions (1 & 3) out of all 3 and solved 2 as well but he was expecting to minimize space complexity.

That ended up me in failing interview. I was hoping that position is more tend towards ML/AI domain so I would be able to crack this round easily but they expect you to perform well in DSA round even if it is in ML/AI domain related position.

So, I got eliminated after 1st round.
Feeling so sad :(

Comments (2)