Re: print.e and Other Questions
- Posted by David Cuny <dcuny at LANSET.COM> Mar 05, 2002
- 366 views
Chris wrote: > I don't se how EumsHash() could be useful for the Contest problem. It depends on how you've coded your solution. My word scoring code looks something like this: if find( word, dictionary ) then return <score based on word size> else return <score based on partial match> end if 50,000 is a lot of words to do that initial find on. A hash-based search would speed things up quite a bit. Searching for a partial match would also benefit from a hash table. For example, I encode the word "DOLLAR" under the key "ABCCDE". Replacing the search for the key with a hash would speed things up (although storing the index is a better long-term solution). -- David Cuny