number of islands leetcode | leetcode 200 | dfs | bfs | google microsoft

preview_player
Показать описание




#DFS #BFS #Islands #NumberOfIslands #LeetCode #Problem200 #Medium #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel
Рекомендации по теме
Комментарии
Автор

Would either BFS or DFS be preferable here? The entire grid must be processed regardless (all MxN elements) so I don't know if one would be advantageous over the other.

For example if I had to search for one of many solutions in a tree that are at deep depth, I would use DFS

Kyle-uzyr
visit shbcf.ru