all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,14 @@
Procedure Stooge_Sort(Array L.i(1), i=0 , j=0)
If j=0
j=ArraySize(L())
EndIf
If L(i)>L(j)
Swap L(i), L(j)
EndIf
If j-i>1
Protected t=(j-i+1)/3
Stooge_Sort(L(), i, j-t)
Stooge_Sort(L(), i+t, j )
Stooge_Sort(L(), i, j-t)
EndIf
EndProcedure

View file

@ -0,0 +1,15 @@
Define AmountOfPosts=(?Stop_Data-?Start_data)/SizeOf(Integer)
Dim Xyz.i(AmountOfPosts)
CopyMemory(?Start_data, @Xyz(), ?Stop_Data-?Start_data)
Stooge_Sort(Xyz())
For i=0 To ArraySize(Xyz())
Debug Xyz(i)
Next i
DataSection
Start_data:
Data.i 1, 4, 5, 3, -6, 3, 7, 10, -2, -5, 7, 5, 9, -3, 7
Stop_Data:
EndDataSection