コード例 #1
0
 def test_1(self):
     self.assertEqual(minimum_jump([1, 2]), 1)
コード例 #2
0
 def test_2(self):
     self.assertEqual(minimum_jump([2, 3, 1, 1, 4]), 2)
コード例 #3
0
 def test_7(self):
     self.assertEqual(minimum_jump([1, 0]), 1)
コード例 #4
0
 def test_8(self):
     self.assertEqual(
         minimum_jump([7, 0, 9, 6, 9, 6, 1, 7, 9, 0, 1, 2, 9, 0, 3]), 2)
コード例 #5
0
 def test_6(self):
     self.assertEqual(minimum_jump([3, 5, 1, 1, 1, 1]), 2)
コード例 #6
0
 def test_5(self):
     self.assertEqual(minimum_jump([2, 3, 1]), 1)
コード例 #7
0
 def test_4(self):
     self.assertEqual(minimum_jump([3, 2, 1]), 1)
コード例 #8
0
 def test_3(self):
     self.assertEqual(minimum_jump([0]), 0)
コード例 #9
0
    def test_6(self):
        self.assertEqual(minimum_jump([3, 5, 1, 1, 1, 1]), 2)

    def test_7(self):
        self.assertEqual(minimum_jump([1, 0]), 1)

    def test_8(self):
        self.assertEqual(
            minimum_jump([7, 0, 9, 6, 9, 6, 1, 7, 9, 0, 1, 2, 9, 0, 3]), 2)


# print(minimum_jump([1, 2]))  # 1
# print(minimum_jump([2, 3, 1, 1, 4]))  # 2
# print(minimum_jump([0]))  # 0
# print(minimum_jump([3, 2, 1]))  # 1
print(minimum_jump([2, 3, 1]))  # 1
# print(minimum_jump([3, 5, 1, 1, 1, 1]))  # 2
# print(minimum_jump([1,0]))  # 1

if __name__ == '__main__':
    unittest.main()

# class Solution:
#     def numberOfArrays(self, s: str, k: int) -> int:
#         k_length = len(str(k))
#         nums = self.get_numbers(s)
#         for num in nums:
#             if

#     def get_numbers(self, s: str, k: int):
#         output = []