a Lua module that provides implementations of various sorting algorithms.
alimiracle d4abc02f6e move to codeberg | 5 月之前 | |
---|---|---|
.gitignore | 1 年之前 | |
LICENSE | 1 年之前 | |
README.md | 5 月之前 | |
lua-sort-1.0-1.rockspec | 1 年之前 | |
lua-sort-1.0-2.rockspec | 1 年之前 | |
lua-sort.lua | 1 年之前 |
this project has been archived here and migrated to codeberg. To access the project in codeberg,
a Lua module that provides implementations of various sorting algorithms.
To use the lua-sort
module, you can require it in your Lua program:
local sort = require("lua-sort")
Once required, you can use any of the provided sorting algorithms by calling the corresponding function on the sort
module.
For example, to sort an array using the bubble sort algorithm:
local arr = {5, 2, 9, 1, 7}
sort.bubbleSort(arr)
After calling the sorting function, the arr
table will be sorted in ascending order.
You can replace bubbleSort
with the name of any other sorting algorithm to use a different sorting method.
This project is licensed under the GPL v3 License - see the LICENSE file for details.