Engaged employer
Given 2 arrays that are already sorted, write a quick function that combines both arrays and returns a single sorted array.
Anonymous
// Java program to merge two sorted arrays import java.util.*; import java.lang.*; import java.io.*; class MergeTwoSorted { // Merge arr1[0..n1-1] and arr2[0..n2-1] // into arr3[0..n1+n2-1] public static void mergeArrays(int[] arr1, int[] arr2, int n1, int n2, int[] arr3) { int i = 0, j = 0, k = 0; // Traverse both array while (i
Check out your Company Bowl for anonymous work chats.