Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Computer science degree and Foxpro
Message
From
25/07/1999 13:38:09
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
22/07/1999 21:24:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00243740
Message ID:
00245869
Views:
13
Hey Paul.

source[1]=10
source[2]=5
source[3]=8
source[4]=1
source[5]=9
source[6]=2
source[7]=6
source[8]=7
source[9]=3
source[10]=4

for i=1 to 10
sorted[source[i]] = source[i]
endfor

so sorted[10] becomes the value of source[1] and sorted[5] gets the value of source[2] etc.

What is amazing about this branch of this topic is the semantics. The code takes an unsorted list of numbers and produced a sorted list of numbers. It does this with only one pass through the source list. Its not possible to argue that this is not the fastest possible sort (unless your a lawyer).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform