Example #1
0
        public void UniquePathWithObstaclesTestCase8()
        {
            var obstacleGrid = new[]
            {
                new[] { 0 }
            };

            UniquePathsII.UniquePathsWithObstacles(obstacleGrid).Should().Be(1);
        }
Example #2
0
        public void UniquePathWithObstaclesTestCase5()
        {
            var obstacleGrid = new[]
            {
                new[] { 0, 1, 1 },
                new[] { 0, 0, 0 },
                new[] { 0, 0, 0 }
            };

            UniquePathsII.UniquePathsWithObstacles(obstacleGrid).Should().Be(3);
        }