This function takes an array of arrays as an argument and All arrays are assumed to be sorted . It merges them together and prints the final sorted output .
public static void mergeKArrays ( int [ ] [ ] arr , int a , int [ ] output ) { int c = 0 ;