Doordash phone screen E5

Anonymous User
770
Jul 03, 2024

https://leetcode.com/problems/walls-and-gates/description/

Problem is same but worded differently.

Input is list of co-ordinates - Eg. [[0,1], [2,2], [4,4]]
output should be list of distances of closest gate from each co-ordinate - [1,2,-1]

-1 indicates not possible to reach any gate from that co-ordinate.

Comments (3)