[algogeeks] Re: find common subword

2006-07-21 Thread Singularity
How about concentating all your strings into a single long string and then constructing a suffix tree? The strings will be seperated using a special character that does not belong to any of them (let's say that they will be null seperated). Using this suffix tree to find the longest common sub-wor

[algogeeks] Re: Length of Linked List with Cycle

2006-07-21 Thread Singularity
Did you detect the exact element that points backwards, or you just know that there is a cycle somewhere in the list? (There is a simple and efficient algorithm to know that there is a cycle without detecting the exact element that points backwards) --~--~-~--~~~---~-