There was an error while loading. Please reload this page.
1 parent ea2a6ea commit c464181Copy full SHA for c464181
1 file changed
data_structures/arrays/merge_sorted.py
@@ -42,8 +42,8 @@ def merge_sorted_arrays(nums1: list[int], nums2: list[int]) -> list[int]:
42
ValueError: nums = [1, -1] is not sorted
43
"""
44
for nums in (nums1, nums2):
45
- if list(nums1) != sorted(nums1):
46
- msg = f"{nums1 = } is not sorted"
+ if list(nums) != sorted(nums):
+ msg = f"{nums = } is not sorted"
47
raise ValueError(msg)
48
# If one array is empty, simply return the other.
49
if not nums1:
0 commit comments