[Accepted]My short java solution (0ms)


  • 0
    P
    for(int i = m+n-1; i >= 0 && n > 0; i--){
        nums1[i] = m > 0 && nums1[m-1] > nums2[n-1] ? nums1[m---1] : nums2[n---1];
    }
    

Log in to reply
 

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