InsertionSort(List)

PivotPosition = 2

WHILE(PivotPosition <> List.End)

TempBay = List[PivotPosition]

FOR i=1 TO PivotPosition - 1

IF(List[i] < TempBay)

FOR J = PivotPosition TO i+1

J = List[J-1]

NEXT

List[i] = TempBay

TempBay = NULL

END IF

NEXT

IF TempBay <> NULL THEN

List[PivotPosition] = TempBay

END IF

END WHILE

END