亚麻 SDE3 Silicon valley 挂经

Phone screen:

  1. Find path if person can ski from one position to finish position. there may be trees on the way where he can ski. I used bfs from given point to finish point.
  2. Design Instagram.
  3. Many behavioral questions.

Onsite:

  1. Design : it was related to networks that was ok, since it was related to my background,
  2. code: find shortest way to the cinema from any point in the given grid of size MxN. There may be some points ‘X’ where you cannot walk or drive.
    My attempt:
     bfs(grid, I, j):
                Start bfs from i,j point for all directions.  Start updating distance like 1 , 2 etc after skipping ‘X’. if any already calculated distance is less then do not go further.
     
	 For i in len(grid):
                          For j in len(grid):
                               If grod[i][j] == ‘C’:
                                       bfs(grid, I, j)
  1. code: implement find system call with given some extra system call as helper functions like DIR, FILE etc.

  2. https://leetcode.com/problems/insert-delete-getrandom-o1 (I was not able to nail it fully in the interview).

  3. Many behavioral questions in all the interviews. Like failed project, best project, when you lead the team, when you motivate the team, something you did that impact the organization, any initiative than your normal work etc.