- 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.
- Design Instagram.
- Many behavioral questions.
- Design : it was related to networks that was ok, since it was related to my background,
- 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.
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)
code: implement find system call with given some extra system call as helper functions like DIR, FILE etc.
https://leetcode.com/problems/insert-delete-getrandom-o1 (I was not able to nail it fully in the interview).
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.