From 4c00c7fb9a648e336973de6d4d40f535dab1410c Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 18 Oct 2023 16:30:38 -0500 Subject: md5 and sorting improvments --- s.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 's.lua') diff --git a/s.lua b/s.lua index a788793..108a502 100644 --- a/s.lua +++ b/s.lua @@ -3,13 +3,14 @@ local a = llib.array local tab = {} math.randomseed(os.time()) -for i=1,5 do - table.insert(tab,math.random(1,999));-- + math.random(1,999)); +for i=1,9999999 do + table.insert(tab,i);--math.random(1,10));-- + math.random(1,999)); end -local l1 = a.bogosort(tab) - -for l,i in pairs(llib.array.reverse(l1)) do - print(i) +local l1 = a.shellsort(tab) +print(a.sindex(l1,999)); +--print(a.index(l1,1)) +for l,i in pairs(l1) do + --print(i) end -- cgit v1.2.3