# 亚麻SDE1 3轮VO

9月中，一周收到OA

OA1: 7 debugging questions ( choice of language )

OA2: 2 algorithm questions

1. Favourite Genres
2. Copy List with Random Pointers
(https://leetcode.com/discuss/interview-question/344650/Amazon-Online-Assessment-Questions)

OA3: Work simulation + 35 minutes worth of Logical MCQs

Got an email for interview scheduling after a week of Part 3 of OA.

3轮VO :

Began with 2 Leadership Principles based questions

1. A time when you had to go beyond your scope of work to finish a task
2. A time when you had to help someone at the expense of your work

Gave the sorting based solution.
Since I arrived at the solution fairly quickly, he asked me to implement the sort function from scratch as well. Used Merge Sort to sort by the frequency, but couldnt figure out the sort in alphabetical order, because interviewer said “running out of time”.

I realised later that I could have the used the more optimum version, that is using Heaps.

Began with 2 Leadership Principles based questions

1. A time when you had to finish a task in limited time frame
2. A time when you had to compromise on work quality because of looming deadline

Got one coding question to solve, which had 3 parts :

1. Given 2 unsorted lists, merge them into one and sort them
2. Remove all the other duplicates of elements from the list and return just one of their values
e.g. ( 2,2,3,3,4 ) -> ( 2,3 )
3. Calculate the frequency of the duplicates

The question was formulated in a very strange fashion, so I began first by combining the two unsorted lists ( list1 + list2 ), and applying a simple sorting algorithm on them for Part 1.
For Part 2, I started to use an approach similar to https://www.geeksforgeeks.org/remove-duplicates-from-a-sorted-linked-list/, while also keeping a count of the duplicates for Part 3, but the interviewer interjected saying that you can combine all the three parts together, if you just use sets.

After listening to him, I changed the approach, and he was satisifed with the answer, although I think I screwed up by thinking of an unnecessarily complex algorithm.

The interviewer also seemed disinterested in the entire interview process, and was just listening and responding for the sake of it.

Began with a coding question

I started off by saying that this can be done with a Brute force approach, and that Id rather work towards a more optimal one. He asked me to code the brute force first and said we will move towards the optimal one afterwards.
After the brute force was done, he was happy, and asked for an optimal solution.
After a few minutes of thinking, I have the Stack solution, and he asked me to implement it.
I couldnt figure out the way to handle one test case, that is if the list is sorted in descending order, but he said that its fine, and since time is running out, we should move ahead to LP questions instead.

But he mentioned that he liked my approach, and how I reached it as well.
Nice, friendly interviewer.

2 Leadership Principles based questions