@greghogg5: Apple Interview Question - Island Perimeter Join 65k+ Developers Studying For Tech Interviews For FREE at Algomap.io! #programming #coding

Greg Hogg
Greg Hogg
Open In TikTok:
Region: CA
Wednesday 12 March 2025 05:00:06 GMT
15345
402
5
9

Music

Download

Comments

jordanlesniak99
Neiltysonchickn :
The bottom left square is 3 and other middle one is 2 but still the same answer
2025-03-12 05:07:47
32
thefifthsting
Aiden :
Wrong. This is Apple. Just guess and under no circumstances document anything about it.
2025-03-13 00:21:41
2
varno91
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
safeeer89
Safeer :
Wait you never even stated the problem and what we're looking for
2025-03-12 22:06:53
0
sstoichev25
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.

Other Videos


About