[pgh-pm] Algorithms for finding words that are bases of others

Avi avi at finkel.org
Fri Apr 11 19:11:08 CDT 2003


Looks a lot like a trie --

Check out Tree::Trie for a perl impl.

James O'Kane wrote:

>Earlier this semester for my Algorithms class we had to solve search words
>(an NxN block of letters that have words hidden in them) using a de la
>Briandias tree. One explaination of the datastructure is here:
>http://www.cs.pitt.edu/~flying/CS1501/Recitation1.htm
>
>For that assignment we were looking for prefixes, so things higher in the 
>tree were merged based on the first letters. I haven't thought it through, 
>but perhaps they could be inserted last letter first?
>Or, when walking the tree, if you find an o on the same level as a string 
>terminator, chec and see if the 'o' has a w and end of string following 
>it.
>
>The class is in c++ or java, so I'm not sure if this maps well to thinking 
>in perl.
>
>-james
>
>
>_______________________________________________
>pgh-pm mailing list
>pgh-pm at mail.pm.org
>http://mail.pm.org/mailman/listinfo/pgh-pm
>
>
>
>  
>





More information about the pgh-pm mailing list