Re: [algogeeks] You have to count the occurances of all words in a document. You are given a method chat * GetNextWord, that returns the next word from the document.

2010-03-04 Thread ankur aggarwal
trie data structure On Sat, Feb 27, 2010 at 1:13 PM, subbu bvss bvss.su...@gmail.com wrote: i think u have to use t9 algorithm.. (tree type data structure)... On Sat, Feb 27, 2010 at 6:32 PM, abhijith reddy abhijith200...@gmail.comwrote: You can use a TRIE .. Structure can be something

[algogeeks] first K digit

2010-03-04 Thread rajesh patidar
i wanna to know how to find the kirst k digit of n^n n can wary from 0n10^9 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] You have to count the occurances of all words in a document. You are given a method chat * GetNextWord, that returns the next word from the document.

2010-03-04 Thread Umer Farooq
I can't get how will u manipulate the trie DS. u'll have to look back and see if the word already exists in the list. this will be an extra overhead. I have thought of another algorithm. Here is an abstract explanation: The node used will be like this struct Word { .char *_word;

Re: [algogeeks] first K digit

2010-03-04 Thread vivek bijlwan
we can use modular exponentiation to start with. On Tue, Mar 2, 2010 at 9:38 PM, rajesh patidar patidarc...@gmail.comwrote: i wanna to know how to find the kirst k digit of n^n n can wary from 0n10^9 -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] first K digit

2010-03-04 Thread Anil C R
modular exponentiation would give the last few digits... (btw this is a problem from spoj :P) Anil On Thu, Mar 4, 2010 at 1:59 PM, vivek bijlwan viv...@gmail.com wrote: we can use modular exponentiation to start with. On Tue, Mar 2, 2010 at 9:38 PM, rajesh patidar

Re: [algogeeks] first K digit

2010-03-04 Thread B |_ /\ C |--D ! /\ /\/\ O /\| D
that last one can be done from modular way how to get the first i have read the problem on kodechef. On Thu, Mar 4, 2010 at 1:59 PM, vivek bijlwan viv...@gmail.com wrote: we can use modular exponentiation to start with. On Tue, Mar 2, 2010 at 9:38 PM, rajesh patidar