searching algorithm
Terry Reedy
tjreedy at udel.edu
Thu May 10 23:53:09 EDT 2007
More information about the Python-list mailing list
Thu May 10 23:53:09 EDT 2007
- Previous message (by thread): ANN: eGenix mxODBC Distribution 3.0.0 (mxODBC Database Interface)
- Next message (by thread): searching algorithm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Neil Cerutti" <horpner at yahoo.com> wrote in message news:lNM0i.34412$G23.27437 at newsreading01.news.tds.net... | Every node is a tuple of its letter, a list of its children, and | a list of its words. So the two 'pelin' nodes would be (with 'e' | referenced in the 'h' node): | | ('h', [('e', [], ['pelin'])], ['pelin']) | | That would in turn be "stored" in the t, n, i and s nodes. [snip] At the outer level, I would use a list in order to build the structure in pieces, one for each letter, and then add them in. At the top level, the letters do not need explicit storage. The first subtree is for words starting with 'a', etc. In other words, the position of each subtree indicates its starting letter. For most letters, this can be carried on another level. tjr
- Previous message (by thread): ANN: eGenix mxODBC Distribution 3.0.0 (mxODBC Database Interface)
- Next message (by thread): searching algorithm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list