Two line Java code


  • 0
    L

    public class Solution{
    public void merge(int[] nums1, int m, int[] nums2, int n) {
    System.arraycopy(nums2,0,nums1,nums1.length,nums2.length);
    Arrays.sort(nums1);
    }
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.