Problem with number_list_cmp | topic started 9/10/2003; 10:12:21 PM last post 9/11/2003; 11:40:52 PM |
|
|
John Jones - Re: Problem with number_list_cmp 9/11/2003; 11:40:52 PM (reads: 1116, responses: 0) |
Hi, I am open to suggestions on how to best modify this. I will try to outline how/why sorting is involved. In matching unordered lists of numbers, two basic algorithms suggested themselves
For sorting, I tried to tap into perl's sorting algorithm which should be fast and efficient, but as noted, this can be tricky. I could build an old fashioned bubble sort into the routines. That would avoid calling perl's sort. It is inefficient for long lists, but this routine is rarely used on lists of 4 or more. Thoughts? John |