You can try a linked list based approach, wherein the algo can be outlined as
You have one linked list for each alphabet, so you have to keep an array of linked list heads of 26 elements.
You can insert words inot the linked list based on string comparisons.
I don't have much elaboration on the concept, suggessions welcome.
On 10/8/06, raja <[EMAIL PROTECTED]
> wrote:
The problem is like this:
We represent lexicographic words with digits.
So,
a=1
b=2
c=3
.
.
.
.
z=26
ab=27
ac=28
.
.
.
az=51
bc=52
.
.
.
I am unable to find a general formula for this. It seems that I need as
mane sigma as many number of letters are (means as many for loops). Can
anybody propose a better answer?
--
A man with dreams is never alone
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---
