Results 1 to 20 of 20

Thread: Unscrambling Scrambled Words

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464

    Unscrambling Scrambled Words

    Basically, my program is a way you can unscramble scrambled words. For example, words that are in the dictionary, "paphy" could be "happy". This is more of an "idea" optimization and not code... I do have the code, and if you need, I can let you see, but I just think it's not the code that's slowing it down, but rather how I do it.

    By the way, it's really slow on words like 5 characters let's say... It takes like a minute seconds. But, for larger words, it takes like either a LONG time like five minutes or freezes and goes "Not Responding". I'd like to get ALL words to 30 seconds or less.

    So, what I do is this:

    - You type the scrambled word in the textbox, "paphy".

    - It sees how long "paphy" is, which is 5 characters.

    - It goes through a text list of a dictionary and removes ALL words that are NOT 5 characters.

    - Then, it goes through EACH word of the "stripped down" dictionary list and checks for EACH word if EACH charcter of "paphy" matches with one of the words. It does this for EACH word on the list...

    I think it's mainly the last step which causes it to be slow, but I can't think of any way how I could change it. Now obviously it's not complete because using my "algorithim" there could be another word that has an "a p h y" in it, but only one "p", for example. This is basically an ALPHA or Pre-BETA version for my program, so that's why I havn't completed it yet.

    Can anyone think of a better way to do this? And I don't think this really matters, because it's just an idea, but this is being done in VB6... that might be a little bit why it is slow. Then again, I'm sure VB6 can handle it. I will be porting this to C/C++ soon, so that should help.

    Thanks in advance and sorry for typing so much!
    Last edited by alacritous; Apr 30th, 2005 at 04:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width