a Lua module that provides implementations of various sorting algorithms.
alimiracle d4abc02f6e move to codeberg | il y a 5 mois | |
---|---|---|
.gitignore | il y a 1 an | |
LICENSE | il y a 1 an | |
README.md | il y a 5 mois | |
lua-sort-1.0-1.rockspec | il y a 1 an | |
lua-sort-1.0-2.rockspec | il y a 1 an | |
lua-sort.lua | il y a 1 an |
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.