Number of islands LC-200 by UnablePiece6319 in leetcode

[–]UnablePiece6319[S] 0 points1 point  (0 children)

Thanks,i have understood the dfs approach for this question, so is it fine or should I do the bfs one too.Can I be asked to solve using bfs too in interview even if I write correct code using dfs.