i want to build the function merge in java using the varuable max_num
any body have an idea?
here is the full question>>
public static void merge(int[] arr, int low, int mid, int high, int max_num)Which performs merging of the sorted parts [low,mid] and [mid+1,high] without the use of additional memory depending on the input size (can be used O(1) memory only).
Assumptions: the array is of integers. The values of the members in the array are small Literally from the root of the integer maximum value supported by the machine. You can use the auxiliary variable num_max as you wish (for example, you can decide to store an integer in it )