Facebook | Phone Screen | Merge Sorted Array, Path in Grid
Company: Facebook
Role: E3
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Hey everyone, I had my phone screen for Facebook (E3 Level). 2 Questions, 45 min, First 5 for intro, next 35 for coding, last 5 for any questions by me?
Questions were pretty simple.
1. https://leetcode.com/problems/merge-sorted-array/
2. Print any path from top-left corner to bottom-right matrix, matrix cell contains 2 values, 0 and 1. 0 means can move, 1 means blocked.
Couldn't find exact question on Leetcode.
Moving to onsite.
Tips:
1. Prepare WHY are you following a particular approach, like BFS/DFS in 2nd question.
2. Time complexity must be known for the algo you are writing. Can ask how did you calculate time complexity? Don't cram.
3. How are you making the answer in 2nd question, while backtracking or while moving forward? Any benefits (if any).