@aditya there is always trade-off. for what it's asking, TRIE is probably the fastest. the problem already stated, using "data structure", which to me, means, you index a document. indexing is expensive, but it's overhead process and it has nothing to do w/ finding an existing word in a doc.
On Dec 10, 5:33 am, ADITYA KUMAR <aditya...@gmail.com> wrote: > @ankit > u can'nt use TRIE > becoz , input will be given in form of text > so generating the TRIE will be much expensive than linear search > > On Fri, Dec 10, 2010 at 3:13 PM, GOBIND KUMAR <gobind....@gmail.com> wrote: > > Help me in solving this problem... Define a data struct for the > > search engine which will represent whether > > > given word is there in the document or not .It should be fast. > > > -- > > 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 > > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups > > .com> > > . > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. > > -- > Regards > Aditya Kumar > B-tech 3rd year > Computer Science & Engg. > MNNIT, Allahabad. -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.