add proper doctest

This commit is contained in:
kvvCoutureAI 2024-10-01 16:29:56 -04:00
parent 79dc703e24
commit 28594f05a2

View File

@ -55,8 +55,11 @@ class Solution:
:return: Boolean
Example:
can_arrange([1, 2, 3, 4, 5, 10, 6, 7, 8, 9], 5)
Output: True
>>> obj = Solution()
>>> obj.can_arrange([1, 2, 3, 4, 5, 10, 6, 7, 8, 9], 5)
True
>>> obj.can_arrange([1, 2, 3, 4, 5, 6], 7)
True
"""
sol_arr = [0 for i in range(input_num)]
for i in arr: