Given an N x M grid with empty cells (0), plants (1), and a starting position (2), find the length of the shortest path to reach any boundary cell without stepping on any plant, moving only in 4…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.