Example #1
0
 def test_case_14(self):
     self.assertEqual(
         minNumberOfJumps(
             [3, 12, 2, 1, 2, 3, 15, 1, 1, 1, 3, 2, 3, 2, 1, 1, 1, 1]), 3)
Example #2
0
 def test_case_2(self):
     self.assertEqual(minNumberOfJumps([1, 1]), 1)
Example #3
0
 def test_case_1(self):
     self.assertEqual(minNumberOfJumps([1]), 0)
Example #4
0
 def test_case_12(self):
     self.assertEqual(
         minNumberOfJumps(
             [3, 10, 2, 1, 2, 3, 7, 1, 1, 1, 3, 2, 3, 2, 1, 1, 1, 1]), 6)
Example #5
0
 def test_case_11(self):
     self.assertEqual(
         minNumberOfJumps(
             [3, 4, 2, 1, 2, 3, 7, 1, 1, 1, 3, 2, 3, 2, 1, 1, 1, 1]), 7)
Example #6
0
 def test_case_8(self):
     self.assertEqual(minNumberOfJumps([2, 1, 2, 2, 1, 1, 1]), 4)
Example #7
0
 def test_case_6(self):
     self.assertEqual(minNumberOfJumps([2, 1, 2, 3, 1]), 2)