This content has been marked as final. Show 4 replies
You don't appear to be actually sorting the array in that code. You must call insertionSort() and you must call printArray() once you have it sorted.
would this fix the problem
// ArrayUtil.printArray(array); StopWatch sWatch = new StopWatch(); sWatch.start(); insertionSort(list); sWatch.stop(); // ArrayUtil.printArray(list); System.out.println("Elapsed time: " + sWatch.getElapsedTime() + " milliseconds");
would this fix the problemHave you tried it?
It is probably not a good idea to introduce timing code before you have you original problem sorted out.
yea i tried what i added, opened up a whole new pile or errors, and i'm not sure how to call those methods, i looked at other codes and i guess i just don't know how to do that.