示例#1
0
        public void Cut_a_rod_memo_version_bottom_up_find_max_price_for_the_asked_element()
        {
            // arrange
            int[] prices = new int[] { 1, 5, 8, 9, 10, 17, 17, 20, 24, 30 };

            // act
            var result = Solutions.BottomUpCutRod(prices, 9);

            // assert
            result.Should().Be(25);
        }