Natural sort or Alphanumeric sort algorithm

Hi

Has anyone worked on Natural Sorting or Alphanumeric sorting of given list. I am planning to write a lotus script code for this, but would like to know the algorithm or technique for such a sort.


Regards
Javed Khan
javaktharAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
javaktharConnect With a Mentor Author Commented:
I referred to Dave Koells Algorithm for Alphanumeric Sorting and have created a similar functionality in Lotus Script, with some changes. With this i am now able to do the required alphanumeric sorting.

Any facing similar problem can get in touch with me for the code.
0
 
TommySzalapskiCommented:
Just use merge sort or insertion sort or whatever your favorite standard sorting algorithm.
The only extra thing you need to do is to write your own less than function. Just parse the string and if you see a number, count the digits first (or extract them, convert to integer and compare).
0
 
mbonaciCommented:
You can use QuickSort/InsertionSort (balanced combination) located in your mail db > form Group > action "Sort members list" calls > QuickSort in form's Globals
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mbonaciCommented:
If you want to publish the code you can do that here and/or (even better) on openNTF.
I'm sure it'll be of good use to someone.
0
 
javaktharAuthor Commented:
Here is the alphanumeri comparison code.  This can be used in any of the sorting methods such as quick sort , selection sort or any other.

This code can be inroduced at the point where the comparison is being done.

I could not access this site for couple of days, hence the delay.
Alphanum.txt
0
 
javaktharAuthor Commented:
There are various scenarios for testing the complete functioning of alphanumeric sorts. My code works well in the scenarios which i have tested so far. It could fail in some unknown scenarios.
0
All Courses

From novice to tech pro — start learning today.