if u have 12 elements of one dimentional array then break into 3-3 elements and sort first 3 elements with last 3 element , and second 3 elements sort with third 3 elements . without any another array, without any inbuilt function. u can create one function like this public void chuncks(int arr[], int splitsize, int length) {} hint: arr.length directly proportional to 2*splitsize