Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Java code for Merging sorted arrays (#516)
Browse files Browse the repository at this point in the history
* Remove Duplicates From Sorted Array

Created PR for Issue #471

* Java Code for merging sorted arrays

Created PR for issue #449
  • Loading branch information
NidhiMalpani authored Oct 10, 2021
1 parent c8b2e93 commit 4588f76
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Programming/Java/MergeSortedArray/MergeSortedArray.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class MergeSortedArray {
public void merge(int[] nums1, int m, int[] nums2, int n) {
int i=m;
for(int j=0;j<n;j++){
nums1[i]=nums2[j];
i++;
}
Arrays.sort(nums1);
}
}

0 comments on commit 4588f76

Please sign in to comment.