Things you should know first:
- Basic Lua
- Tables ( <-- Major part of this )
There are 2 types of sorting algorithms that I've provided (But many more exist)
Each has advantages and disadvantages in certain situations
I've added a special 'compare' function that lets you decided
how data is compared, it is required for all of the provided sorting
algorithms to work!
compare Function
How to make tables that can be sorted
The Sorting Algorithms
Merge Sort
Most efficient when...
You don't know if the table is sorted or not
OR
The table isn't sorted yet
Insertion Sort
Most efficient when...
Data is sorted, but a new entry was added and needs sorting
Sorry for the long post
If this was helpful, how about a +1
If any of my info is incorrect, or you need help, leave a comment!
Edited by HPWebcamAble, 27 June 2015 - 01:17 AM.












