public class BuggyMTMergeSort { private int[] to_sort; private int total_sort_threads; public BuggyMTMergeSort(int[] to_sort, int no_threads) { this.to_sort = to_sort; this.total_sort_threads= no_threads; } public void sort() { // correct amount of threads, if it is invalid if (to_sort.length1) { int n = arrays.length; int[][] temp = new int[(n+1)/2][]; // to store the merged arrays temp[(n+1)/2-1] = arrays[n-1]; // to not lose the last part, if there is an odd amount of parts for (int i=0;i