I had my phone screen for L4 today and I got asked two questions. First one, I was able to code it out within 20 mins but the second one I was able to reach the answer using hints only. But I was not able to code or solve the second question by myself. What are my chances to proceed further?
Q1 : There is a M x N grid and your task is to transport packages from N packing facilities to warehouse W.
Inputs : Location of warehouse W, locations of N packing facilities, your initial position
You can only carry one package at a time. Find minimum distance you need to travel to transport all the packages.
Q2 : You have been given a M x N grid and you have to trasmit a message from (0, 0) to (M-1, N-1). To transmit a message, you need towers. Initially there are no towers on the grid. You have to call an API getTower. The output of this API would be the day on which the tower will be built on a cell in grid. Example getTower(1, 2) = 3 means that a tower will be built on cell (1, 2) on day 3. The message can only be transmitted through towers. Your goal is to find the minimum days required to trasmit a message from (0, 0) to (M-1, N-1).
UPD : I got selected for onsite rounds.