Modified quicksort algorithm to sort 2 arrays of integers in-place without combining them into 1 array. Can be used when arrays are too large to combine, also can be expanded to work on n number of arrays.
Modified quicksort algorithm that takes two arrays as input and treats them as one. It sorts the arrays inplace without combining them in memory.
The algorithm can be made more efficient by using the randomized version of Quicksort.
Input [4, 6, 1] [2, 3, 9]
Output [1, 2, 3] [4, 6, 9]
To test this algorithm, call SortArrays function with 2 arrays as input.