Amazon | Applied Scientist Intern | Bangalore | Jan 2022 [Reject]

amazon logo
amazon
Applied Scientist InternbangaloreRejected
January 10, 202243 reads

Summary

I recently interviewed for an Applied Scientist Intern position at Amazon in Bangalore and was rejected after the first DSA round. Although I successfully solved two out of three problems, my approach for one question didn't meet the interviewer's space complexity expectations.

Full Experience

My interview for the Applied Scientist Intern role at Amazon, Bangalore, took place in January 2022. I was quite hopeful, expecting the position to lean more towards ML/AI. However, the first round was a pure Data Structures & Algorithms round, which ultimately led to my rejection. The interviewer presented me with three questions. I managed to solve the first and third questions completely. For the second question, I had a solution, but the interviewer was looking for a more optimized solution concerning space complexity, which I couldn't provide at that moment. This round ended up being my downfall, and I was eliminated, leaving me feeling quite sad despite my hopes for the ML/AI domain.

Interview Questions (3)

Q1
Check if Binary Tree is BST
Data Structures & AlgorithmsEasy

Given a binary tree, determine if it is a valid binary search tree (BST). The interviewer mentioned this was to build confidence.

Q2
Merge K Sorted Linked Lists
Data Structures & AlgorithmsHard

Given lists of linked lists, merge them into a single sorted linked list in minimal time complexity.
For example, if the input is [[1->2->3], [4->18], [10->12->15->20]], the expected output is 1->2->3->4->10->12->15->18->20.

Q3
Minimum Swaps to Group Ones in KxK Box
Data Structures & AlgorithmsHard

Given a 2D array (matrix) of 0s and 1s. You need to find the minimum number of swaps required to bring all '1's into a k x k square sub-matrix. Here, k*k represents the total count of '1's present in the entire 2D array.
For example, given a 3x3 matrix (n=3) and k=2 (meaning there are 4 ones in total):

1 0 0
1 0 1
0 1 0
If we consider the top-left 2x2 matrix, it already contains two '1's. We need to move the other two '1's into this box. The minimum number of swaps required is 2.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!