Doordash phone screen E5
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2024-07-03Added By Anonymous
Source: Link
Company: DoorDash
Role: E5
Stage: Phone Screen
Location: unknown
Year: unknown
Role: E5
Stage: Phone Screen
Location: unknown
Year: unknown
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.