예제 #1
0
        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));
        }
예제 #2
0
        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));
        }