Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread Yogesh Yadav
i=0; char *str; while(a[i]!=NULL) { j=0; while(j!=i) { for(k=j;k=i;k++) { l=0; str[l]=a[j]; } if(Dictionary.findword(str)) printf(str); j++; } } ... On Mon, Sep 19, 2011 at 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote: given

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread Yogesh Yadav
// there were some mistakes... so... i=0; char *str; while(a[i]!=NULL) { j=0; while(j!=i) { l=0; for(k=j;k=i;k++) { str[l]=a[j]; l++ } if(Dictionary.findword(str)) printf(str); j++; } } On Mon, Sep 19, 2011 at 8:44 PM,

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread keyan karthi
construct a trie.. then a simple recursion on the trie ll do ... :) any standard tutorial on tries ll help u build one ... then the recursion part should look something like this, start scanning from root of tire. if(end of word is found) { take is as a word, start searching from root of a

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread keyan karthi
didnt read the question properly ... ignore ma post !! :/ On Mon, Sep 19, 2011 at 8:44 PM, Yogesh Yadav medu...@gmail.com wrote: i=0; char *str; while(a[i]!=NULL) { j=0; while(j!=i) { for(k=j;k=i;k++) { l=0; str[l]=a[j]; }

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread praveen raj
Use trie. On 19-Sep-2011 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote: given an array of characters without spaces and a dictionary.All valid dictionary words must be found and printed. i/p : BANKERKCATXYWOMAN. o/p: BANK BANKER CAT WOMAN MAN (the only function you could use for

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread prasanth n
@don: can u give the algorithm?? On Mon, Sep 19, 2011 at 10:37 PM, praveen raj praveen0...@gmail.com wrote: Use trie. On 19-Sep-2011 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote: given an array of characters without spaces and a dictionary.All valid dictionary words must be found and

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread sukran dhawan
trie data structure On Mon, Sep 19, 2011 at 10:37 PM, praveen raj praveen0...@gmail.com wrote: Use trie. On 19-Sep-2011 8:20 PM, Sangeeta sangeeta15...@gmail.com wrote: given an array of characters without spaces and a dictionary.All valid dictionary words must be found and printed. i/p

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread Bhanu Kishore
See this algorithm: http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group,

Re: [algogeeks] All valid dictionary words must be found and printed.

2011-09-19 Thread Ankur Garg
nice find bhanu..though i didnt get much :P on first read :D :D On Tue, Sep 20, 2011 at 4:34 AM, Bhanu Kishore bhanukishor...@gmail.comwrote: See this algorithm: http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm -- You received this message because you are