Array Index out of Bound Merge Sort

In merge(), after

   s[k] = u[i];

the code is missing

   i++;

There may be other issues, but this seems to be the main one.

Leave a Comment