Esempio n. 1
0
 def test_count_islands_2_islands(self):
     rows, cols, map, lands_cnt, coloring_map = self._map_2_islands()
     self.assertEqual(count_islands(rows, cols, map), lands_cnt)
Esempio n. 2
0
 def test_count_islands_invalid_shape(self):
     rows, cols, map, lands_cnt, coloring_map = self._map_invalid_shape()
     self.assertEqual(count_islands(rows, cols, map), -1)