Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 12th, 2007, 11:01 PM
cj21 cj21 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 1 cj21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 11 sec
Reputation Power: 0
Unhappy Help with C program algorithm

I'm attempting to write a program in C in which When given a set of letters the program searches a dictionary of words to find all the words that can be made from those letters and outputs those words. Each letter
can be used at most once and the underscore ("_") can stand for any single letter.

For example, given
the set of letters aert_ , the words output may include
ARE
AREa
AT
ATE
EAT
mATE
RAT
RATE
REAd
TEAR
TRAdE
TREAd
Where blanks are printed in lower case.

I thought it would be simple enough, but I'm having problems developing an algorithm that allows for the output of all the word variations. For example, matching the entered characters so that the search allows RATE and TEAR to be output.
Any suggestions on how to start?

Chris

Reply With Quote
  #2  
Old March 17th, 2007, 10:51 AM
crusader.on crusader.on is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Location: India
Posts: 10 crusader.on User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 56 sec
Reputation Power: 0
this can be simply done by
1. taking string length of no the string u'll enter

Eg if u enter: arsd_

by using strlen function calculate the string lenght.

next step...
u need an external file with all these words u wanna find

then do a simple search of words and then with simple if else condition u'll manage that...

PS: i m presuming that u r good at programming

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Help with C program algorithm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT