Hi,I've made the changes to the class as suggested but haven't posted them as yet.
but there is no need to rewrite the outer loop, is it?
for i=h to n-1
...
The inner loop, with the problem of the conditional And, could be written as
do while j>=h
if a(j-h)<=t then exit do
...
loop
In my opinion, exit do should be avoided (when possible).
Regards
H.W. Lang
Past (20 years or so) and present code. A variety of languages and platforms. Some gems. More gravel. Some useful stuff and some examples of how not to do it.
Saturday, October 15, 2005
[VBScript] sorting algorithms
Thanks to Dr Hans Werner Lang for his helpful comments on the sorting routines, as below:
Labels:
sorting
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment