Re: A89: Crossword puzzle


[Prev][Next][Index][Thread]

Re: A89: Crossword puzzle




In a message dated 2/25/99 6:51:31 PM Eastern Standard Time,
nlmueller@students.wisc.edu writes:

> Unfortunatly the only way to do this would be to store a large dictionary
>  on the calc.  The common Linux dictionary (/usr/dict/words) is over 200kb.
>  If you wanted you probably could include a smaller dictionary with the most
>  common words.  The best algorithm I know of to search the dictionary for
>  the target word is a binary search.  Select the middle word in the
>  dictionary, if the target word is alphabeticly after it, repeat with that
>  half of the dictionary.  Otherwise repeat with the first half.  If your
>  dictionary is n words long, the worst case would be lg(n) comparisons
>  before you find the word.  Irregardless, I don't think you would be able to
>  get people to use a crossword program that took up more then half of the
>  total memory (including archive) on the calc.
>  


i think he meant a way to check if the inputted words=the answer words, not
generating random words from a dictionary.