Re: [algogeeks] Facebook Online Question India

2011-11-10 Thread Amol Sharma
this can be done by simple string matching...KMP algo. correct me if i am wrong !! -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad http://gplus.to/amolsharma99

Re: [algogeeks] Facebook Online Question India

2011-11-10 Thread Jagannath Prasad Das
How many students they took and whats the offer? On Thu, Nov 10, 2011 at 8:03 AM, rahul sharma rahul23111...@gmail.comwrote: facebook visit DCE???wats package??? On Wed, Nov 9, 2011 at 9:22 PM, Decipher ankurseth...@gmail.com wrote: This question was asked by Facebook during their 2 hour

Re: [algogeeks] Facebook Online Question India

2011-11-10 Thread Ashish Goel
KMP is exact substring match, so this is tricky.. Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Thu, Nov 10, 2011 at 6:05 PM, Amol Sharma amolsharm...@gmail.com wrote: this can be done by simple string matching...KMP algo. correct me if i

Re: [algogeeks] Facebook Online Question India

2011-11-10 Thread Ashish Goel
build a multimap and a map multimap to contain occurances of words of pattern substring in bigger substring and map is to keep track of words covered in second parse the pattern substring is say abc def geh ijk and the given string is abc ijk lmn geh ijk def def abc lmn the multimap will

[algogeeks] Facebook Online Question India

2011-11-09 Thread Decipher
This question was asked by Facebook during their 2 hour online exam (Only 1 question in 2 hour as per my junior) in DCE. Given a list of words wordlist on 1st line (no of words = 100) and a string qstr of len = 1 million on 2nd line, print the index at qstr where a continuous substring exists

Re: [algogeeks] Facebook Online Question India

2011-11-09 Thread rahul sharma
facebook visit DCE???wats package??? On Wed, Nov 9, 2011 at 9:22 PM, Decipher ankurseth...@gmail.com wrote: This question was asked by Facebook during their 2 hour online exam (Only 1 question in 2 hour as per my junior) in DCE. Given a list of words wordlist on 1st line (no of words = 100)