filmov
tv
Google interview question: Determine number of Islands by using Depth First Search in Python

Показать описание
Google interview question: Determine number of Island by using Depth First Search in Python. This question can be common question during software engineer technical interview.
Given matrix array below, 1= Land, 0 = water, determine number of island using depth first search.
grid = [['1','1','0','0','0'],
['1','1','0','0','0'],
['0','0','1','0','0'],
['0','0','0','1','1']]
#leetcode #python #depthfirstsearch #DFS #softwareinterview #google
Given matrix array below, 1= Land, 0 = water, determine number of island using depth first search.
grid = [['1','1','0','0','0'],
['1','1','0','0','0'],
['0','0','1','0','0'],
['0','0','0','1','1']]
#leetcode #python #depthfirstsearch #DFS #softwareinterview #google