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 .
void mergeKArrays ( int arr [ ] [ n ] , int i , int j , int output [ ] ) {