Algorithm Pattern In a traditional way, we can use a visited array to mark if a cell has been visited. However, if it is allowed, we can also set the visited cell as 0 (ocean indicator) as well. And in some special cases, like if you need to know if a visited cell is valid …
Continue reading “Algorithm Pattern – Island Programs LC 200 1254 1020 695 1905 694”