Amazon | SDE2 | Seattle | Apr 2020 [Offer]
Anonymous User
2406

Years of Experience - 5 years (MS CS Feb 2020)
Location: Seattle

OA:

  1. Given list of toys and list of sentences find top k toys by their occurance (a toy occured in a sentence muliple time should be consider as one occurance)
  2. https://leetcode.com/problems/reorder-data-in-log-files/
  3. Write down your approach and run time for both (section 2)

Took 15 minutes to complete OA as both were easy question

Virtual Onsite:

Interview One:
Two leadership priciple questions with few followups (I forgot the questions)

  1. https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
    Few follow ups regarding data structure I have used or what else we can use.

Interview Two:
Two leadership principle question about what was your most proud achievement and when you were criticized for your work.

Question: On topological sort, you have given list of relation between different action for operating a car, return the list of action group based on the level they can be performed
example:
[ 'close door > start car', 'seat belt > start car', 'start car > gas', 'close door > seat belt'] etc

return
[[close door], [seat belt], [start car]. [ gas]]

you get the gist of the question it was similar to https://leetcode.com/problems/course-schedule-ii/ but in given question one level may have multiple action

Interview three:

Leadership priciples long(30 minutes) (Senior dev manager)

Question: It was not a leetcode question and it does not even required for me to code a working solution as the interview told me he is not expecting me to write working code for it but write function/'s by assuming you will get thing this way(assume that too), consider it was an open ended question

Question - You have given an excel sheet (consider it as 2D array), now each cell in excel sheet can have value of one the following type ( string, integer, reference to another cell, a formula just consider a + b, where a and b can be any of the type again) return me the excel sheet with final values means the final excel sheet should have the values either string or int.

I solved it using dfs by checking current type in the cell and if its a reference perfrom dfs if its a formula solve the formula

def solveExcel(self, matrix):
	for i in range(len(matrix)):
		for j in range(matrix[0]):
			evaluate_cell(i,j, matrix)

def evaluate_cell(self, i, j, matrix):
	if matrix[i][j] != float('inf'):
		if not matrix[i][j].isInteger() and not matrix[i][j] of str:  # this means its a reference or formula need to be solved
				self.helper()  # wrote a psuedo helper function with splitting on the operator like ( +, - etc) it will call process cell again if its a referenced cell with the new coordinate from the excel cell

time ran out as only had 10 minutes to write and make him explain the thought process, but he seemed satisfied then Q&A

Interview four:
System Design Interview
System Design: I was lucky as I got the easy system design for tiny URL, I have explained him based on my reading or *** the System

Hope it helps

Result: I have given the interview on Friday, On Monday got the good news.

Compensation : https://leetcode.com/discuss/compensation/615921/Amazon-or-SDE

Comments (4)