Update array-merge-inplace.py

This commit is contained in:
bt3gl 2023-07-30 15:54:27 -07:00 committed by GitHub
parent 153b111e09
commit e96bf43463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author: bt3gl
"""
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two
integers m and n, representing the number of elements in nums1 and nums2 respectively.
@ -50,4 +54,4 @@ if __name__ == "__main__":
merge(nums1, m, nums2, n)
print(nums1)
# [1,2,2,3,5,6]
# [1,2,2,3,5,6]