leetcode
leetcode copied to clipboard
Skip usage of the 'visit' set. All you need is just add an extra condition
You can skip usage of the 'visit' set. All you need is just add a condition 'if rooms[r][c] >= dist:' in line 34. It reduces memory usage as well as makes the code shorter.
Can you provide a submission URL with this change, please
It's locked on leetcode problem, so I can't, sorry