aboutsummaryrefslogtreecommitdiff
path: root/s.lua
diff options
context:
space:
mode:
authorame <[email protected]>2023-10-15 22:45:54 -0500
committerame <[email protected]>2023-10-15 22:45:54 -0500
commitea8f0940f041d33c0085bed59773093333a4fd99 (patch)
tree636683752d2426147c076d5b64d1831ca430a979 /s.lua
init
Diffstat (limited to 's.lua')
-rw-r--r--s.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/s.lua b/s.lua
new file mode 100644
index 0000000..a788793
--- /dev/null
+++ b/s.lua
@@ -0,0 +1,15 @@
+require "llib"
+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));
+end
+
+local l1 = a.bogosort(tab)
+
+for l,i in pairs(llib.array.reverse(l1)) do
+ print(i)
+end
+