The bottom left square is 3 and other middle one is 2 but still the same answer
2025-03-12 05:07:47
32
Aiden :
Wrong. This is Apple. Just guess and under no circumstances document anything about it.
2025-03-13 00:21:41
2
Varno.au :
could be more efficient. as the island is compact, this can be done by tracing only the exterior of the compact shape, which is better average same worst case than looping over the area
2025-03-12 11:44:11
0
Safeer :
Wait you never even stated the problem and what we're looking for
2025-03-12 22:06:53
0
Stefan :
You could double for to find your first island piece then dfs and each time sum the perimeter of the current island, this way you are more efficiently going through it by not checking every square
2025-03-13 00:00:14
0
To see more videos from user @greghogg5, please go to the Tikwm
homepage.