My task is to write a program to sort (a part of) a given list of comparable elements using binary insertion sort method. Binary insertion method is a modified insertion method that uses binary search to find the insertion point. Implementation has to be stable (has to preserve the original order of equal elements). There are three parameters to program:
a - the list;
left - starting index (included);
right - ending index (excluded).
The method signature is:
static public <T extends Object & Comparable<? super T>>
void biSort (List<T> a, int left, int right)
Piece of code
The method starts from line 130, there are tests and other sorting methods in this program. I dont know why my method doesnt do the job, so any help is more than welcome. Ive been workin on that method nearly week, but due to lack of skills in java it doesnt work out.
Best wishes,
Kert