What did you guys get for the following test case?
[[0,0,0,0,0,0,0],[0,0,1,0,0,1,0],[0,0,0,0,1,0,0],[0,0,0,0,0,0,1]] [0,4] [2,0]
Supposedly the expected output is
ld, however shouldn't it be
dldlu? Am I missing something?
My understanding is that it should first be the shortest path. Only when I find some ties, return the lexicographically smallest among them.
@martingale The question asks for the shortest distance. Ball will roll left until it hits the wall and then it will keep going down until it falls into the hole.
@XeHHXe Ugh, true! Thanks!
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.