Click here to see the full article post
No need to have 'seen' set to keep track of visited squares... if immutability of input grid is not important
Agree with @lulutao. The
seen array is not necessary.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.