Quicksort for 2-dimensional string-arrays

Post Reply
User avatar
Dutchman
Posts: 860
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Quicksort for 2-dimensional string-arrays

Post by Dutchman »

The sorting routines in viewtopic.php?f=20&t=181 operate on numerical arrays.
I have modified Quicksort-functions such that they can operate on strings in general or numerical strings in particular.
The functions are available in the library-file "sort lib.sb"
in the folder https://www.dropbox.com/sh/p775v2f9v9yc ... lt_xa?dl=0
on DropBox.
It contains the following functions:
' Quicksort(…) for numerical arrays
' Quicksort$(…) for string-arrays, not case sensitive
' QuicksortCS$(…) for string-arrays, case sensitive
' QuicksortNum$(…) for numbers in string-arrays
' BubbleSort(…) for numerical arrays, compact code

The program "Sort lib test on strings.sb" is for testing the string-sort functions
The following screenshots are taken from that program.
string sort.PNG
string sort.PNG (207.11 KiB) Viewed 1931 times
speed test.PNG
speed test.PNG (104.78 KiB) Viewed 1931 times

Post Reply