Skip to content

Latest commit

 

History

History
57 lines (28 loc) · 972 Bytes

File metadata and controls

57 lines (28 loc) · 972 Bytes

中文文档

Description

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.

Note:

    <li>The number of elements initialized in <em>nums1</em> and <em>nums2</em> are <em>m</em> and <em>n</em> respectively.</li>
    
    <li>You may assume that <em>nums1</em> has enough space (size that is greater or equal to <em>m</em> + <em>n</em>) to hold additional elements from <em>nums2</em>.</li>
    

Example:

Input:

nums1 = [1,2,3,0,0,0], m = 3

nums2 = [2,5,6],       n = 3



Output: [1,2,2,3,5,6]

Solutions

Python3

Java

...