I was writing an insertion sort code but the code does\'t seem to work correctly. on some cases it works but on some it doesn\'t. here is code part which does the sorting.