Re: [algogeeks] Re: searching all matching words in a Trie with a given filter.

2013-06-08 Thread avinesh saini
{ 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

Re: [algogeeks] Re: Array Problem

2013-06-01 Thread avinesh saini
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.*

Re: [algogeeks] searching all matching words in a Trie with a given filter.

2013-05-30 Thread avinesh saini
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

[algogeeks] searching all matching words in a Trie with a given filter.

2013-05-28 Thread avinesh saini
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

Re: [algogeeks] Re: searching all matching words in a Trie with a given filter.

2013-05-28 Thread avinesh saini
= '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

Re: [algogeeks] least common ancestore bst

2013-05-16 Thread avinesh saini
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

[algogeeks] No of nodes in B-Tree

2011-11-25 Thread avinesh saini
*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.

[algogeeks] Hello World

2011-09-26 Thread avinesh saini
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};

Re: [algogeeks] Reverse the string word by word . Can someone tell what is wrong in my code ?

2011-09-25 Thread avinesh saini
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);