Q2. better approach will be using KMP or Boyce Moore.

-- 
*Thanks
Shashank Mani Narayan
Computer Science & Engineering 
Birla Institute of Technology,Mesra 
**Founder Cracking The Code Lab  "http://shashank7s.blogspot.com/";
FB Page 
http://www.facebook.com/LestCode<http://www.facebook.com/pages/Cracking-The-Code/148241881919895>
Google+ http://gplus.to/wgpshashank
Twitter "https://twitter.com/wgpshashank<https://twitter.com/#%21/wgpshashank>
"*

On Sunday, April 1, 2012 9:52:11 PM UTC+7, atul007 wrote:
>
> Q2 can be done using KMP algo or suffix tree
>
> On Sun, Apr 1, 2012 at 1:12 PM, Decipher <[email protected]> wrote:
>
>> Q1) Yes, as per my friend the only interface is that function. But how 
>> will you traverse the matrix because if : BADCAT is one row then there are 
>> two words BAD and CAT and you have to find both and it could be DAB and TAC 
>> also ?
>>
>> Q2) What will be the complexity when state machine is used ?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/algogeeks/-/RIgd-ITxYDEJ.
>>
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/wt77Wy4S1qMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to