Code format

This commit is contained in:
2025-05-15 20:37:50 +02:00
parent 9e6432d0b0
commit 69d1f9fd93
105 changed files with 24069 additions and 28084 deletions

View File

@@ -1,19 +1,19 @@
local array = {13, 14, 52, 63, 764, 12342, 143, 2, 54, 63, 25, 15}
local sortedarray = {0}
local array = { 13, 14, 52, 63, 764, 12342, 143, 2, 54, 63, 25, 15 }
local sortedarray = { 0 }
for ka, va in ipairs(array) do
for j = 1, #sortedarray do
if va > sortedarray[j] then
if sortedarray[j] > 0 then
for i = #sortedarray, j, -1 do
sortedarray[i + 1] = sortedarray[i]
end
end
sortedarray[j] = va
end
end
for j = 1, #sortedarray do
if va > sortedarray[j] then
if sortedarray[j] > 0 then
for i = #sortedarray, j, -1 do
sortedarray[i + 1] = sortedarray[i]
end
end
sortedarray[j] = va
end
end
end
for k, v in ipairs(sortedarray) do
print(k, v)
print(k, v)
end