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
// 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,
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
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];
}
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
@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
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
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,
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