public void findConnectedFiveIsland() { int[][] islandGrid = new int[][] { new int[] { 0, 1, 0 }, new int[] { 1, 1, 1 }, new int[] { 0, 1, 0 }, }; var islandExplorer = new IslandExplorer(); Assert.AreEqual(5, islandExplorer.MaxAreaOfIsland(islandGrid)); }
public void findOneIsland() { int[][] islandGrid = new int[][] { new int[] { 0, 0, 0 }, new int[] { 0, 1, 0 }, new int[] { 0, 0, 0 }, }; var islandExplorer = new IslandExplorer(); Assert.AreEqual(1, islandExplorer.MaxAreaOfIsland(islandGrid)); }