{
for(int i = 'a'; i = 'z' ; ++i)
findWords(root-link[i], filter+1, word+i);
}
else // Search for words with the required letter
{
findWords(root-link[*filter], filter+1, word+*filter);
}
}
On May 28, 11:36 pm, avinesh saini avinesh.sa...@gmail.com wrote
I was going through this problem on stackoverflow, and I found this classic
article on this very topic
http://www.americanscientist.org/issues/pub/2002/3/the-easiest-hard-problem
Definitely, worth a read.
--
*
*
*thanks regards,*
*Avinesh Kumar
National Institute of Technology, Calicut.*
u r searching in a previously built trie with the given filter...then
wat is this add fxn doing?correct me if m getting u wrng
On Wednesday, May 29, 2013, avinesh saini avinesh.sa...@gmail.com wrote:
Thank you Don, I was also trying in similar way. But here I'm confused
how you are storing
How to search all the matching words for a filter in a trie.
e.g.
searching by filter ...r..m will find all the words(of length = 7) in
trie in which 4th character is 'r' and 7th character is 'm'.
--
*
*
*thanks regards,*
*Avinesh
*
--
You received this message because you are subscribed to
= 'a'; i = 'z' ; ++i)
findWords(root-link[i], filter+1);
}
else // Search for words with the required letter
{
findWords(root-link[*filter], filter+1);
}
}
On May 28, 4:47 am, avinesh saini avinesh.sa...@gmail.com wrote:
How to search all the matching
If one node is parent of other then Parent Node is lowest common ancestor.
Source- http://en.wikipedia.org/wiki/Lowest_common_ancestor (just read it)
On Mon, May 13, 2013 at 1:42 AM, rahul sharma rahul23111...@gmail.comwrote:
[image: BST_LCA]
what should be ancestor of 12 and 14.it
*Suppose that we insert the keys (**1,2,...,n) **into an empty
B-tree with minimum **degree **2. How many nodes does the final B-tree
have?*
explain your answer.!
--
*Avinesh Kumar,
*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
Explain this code-
It is supposed to print- Hello World
#include iostream
using namespace std;
int main()
{
long long int
l1l[]={72,-11037827,917043223,-47519989,1450408591,-194718605,2037206149,-8912843,279667,-26713,-3617,1571,-79};
Try this one...
#includestdio.h
#includestring.h
void reverse(char *p,char*q)
{
char c;
while(pq)
{
c=*p;*p=*q;*q=c;
p++;
q--;
}
}
int main()
{
char A[50];
printf(\n Enter a String:\n\n);
gets(A);
int len=strlen(A);