Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,20 @@
Procedure insertionSort(Array a(1))
Protected low, high
Protected firstIndex, lastIndex = ArraySize(a())
If lastIndex > firstIndex + 1
low = firstIndex + 1
While low <= lastIndex
high = low
While high > firstIndex
If a(high) < a(high - 1)
Swap a(high), a(high - 1)
Else
Break
EndIf
high - 1
Wend
low + 1
Wend
EndIf
EndProcedure