Hmm just did some searching (via google of this site) and can't find any handy BMAX routines to sort an array of integers. There's some bubble sorts for BBasic but not BMax. Looks like I'll have to make one then...shouldn't be too hard. Bubble is easy, but binary sort is faster...(well depends on the application).
Sort Int Array
BlitzMax Forums/BlitzMax Programming/Sort Int Array Bubble is easy, but binary sort is faster
Of course, you meant quick-sort and binary-search ;-)
The built-in array sort uses a quick-sort algorithm.
Here is a great site for comparing sorting algo's... With java source examples, but that should be easy to change to BM...
http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html
http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html
klepto2: Thanks man!
Brucey ;-)
TaskMaster: nice and geeky :-D
Brucey ;-)
TaskMaster: nice and geeky :-D