Count Number of Islands | Interview follow-up question
Anonymous User
426

So recently I gave a mock interview and I was asked this famous problem https://leetcode.com/problems/number-of-islands/
As a follow-up question, I was asked:
What is the maximum internal stack space that can be taken up when you are performing DFS on the matrix?
I gave an answer but I don't think it was correct. Can someone come up with an answer to this (along with an explanation)?

Comments (3)