MCPcopy Create free account
hub / github.com/ROUTINE-STUDY/Algorithm / Sanghoo

Class Sanghoo

LeetCode/Two Pointers/88. Merge Sorted Array/Sanghoo.java:8–20  ·  view source on GitHub ↗

https://leetcode.com/problems/merge-sorted-array/

Source from the content-addressed store, hash-verified

6 * https://leetcode.com/problems/merge-sorted-array/
7 */
8public class Sanghoo {
9
10 public void merge(int[] nums1, int m, int[] nums2, int n) {
11 int index=0;
12
13 for(int i=m; i<nums1.length; i++) {
14 nums1[i] = nums2[index++];
15 }
16
17 Arrays.sort(nums1);
18 }
19
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected