Esempio n. 1
0
 def test_case_2(self):
     self.assertEqual(program.maxSumIncreasingSubsequence([-1]), [-1, [-1]])
Esempio n. 2
0
 def test_case_9(self):
     self.assertEqual(
         program.maxSumIncreasingSubsequence(
             [10, 15, 4, 5, 11, 14, 31, 25, 31, 23, 25, 31, 50]),
         [164, [10, 11, 14, 23, 25, 31, 50]])
Esempio n. 3
0
 def test_case_8(self):
     self.assertEqual(
         program.maxSumIncreasingSubsequence([8, 12, 2, 3, 15, 5, 7]),
         [35, [8, 12, 15]])
Esempio n. 4
0
 def test_case_7(self):
     self.assertEqual(
         program.maxSumIncreasingSubsequence([10, 70, 20, 30, 50, 11, 30]),
         [110, [10, 20, 30, 50]])
Esempio n. 5
0
 def test_case_5(self):
     self.assertEqual(program.maxSumIncreasingSubsequence([1, 2, 3, 4, 5]),
                      [15, [1, 2, 3, 4, 5]])
Esempio n. 6
0
 def test_case_4(self):
     self.assertEqual(program.maxSumIncreasingSubsequence([5, 4, 3, 2, 1]),
                      [5, [5]])