示例#1
0
        public void BinominalCoefficient_Of4Over2_Returns6()
        {
            // Arrange
            var n = 4;
            var k = 2;
            var expectedResult = 6;

            // Act
            var result = FactorialHelper.BinominalCoefficient(n, k);

            // Assert
            result.Should().Be(expectedResult);
        }
示例#2
0
 public long ComputeSolution()
 {
     return((long)FactorialHelper.BinominalCoefficient(TOTAL_NUMBER_OF_STEPS, TOTAL_NUMBER_OF_STEPS_DOWNWARDS));
 }