why can't we change the question to sum=0 ..
On Mon, Sep 3, 2012 at 12:57 PM, atul anand wrote:
> above link was for reference , extending the logic was obvious :) :)
>
>
> On Mon, Sep 3, 2012 at 11:22 AM, bharat b wrote:
>
>> @atul: question is to find the largest continuous sub array .. not ju
above link was for reference , extending the logic was obvious :) :)
On Mon, Sep 3, 2012 at 11:22 AM, bharat b wrote:
> @atul: question is to find the largest continuous sub array .. not just
> continuous sub array ..
>
> we can do this with same logic as mentioned in the above link.. we have to
@atul: question is to find the largest continuous sub array .. not just
continuous sub array ..
we can do this with same logic as mentioned in the above link.. we have to
traverse whole array.. even if we get the solution ..
whenever we get the solution,update the "largest_subarray_start_index" an
http://www.geeksforgeeks.org/archives/19267
On Mon, Sep 3, 2012 at 7:41 AM, Amitesh Singh wrote:
> Given a array, find the largest contiguous sub-array having its sum equal
> to N.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To p
Given a array, find the largest contiguous sub-array having its sum equal to N.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
al
String matching can be performed in linear time with KMP algorithm.
could you say what more optimization you are looking for here?
Sent from my Windows Phone
--
From: prateek gupta
Sent: 23/06/2011 11:17
To: algogeeks@googlegroups.com
Subject: [algogeeks] string
Patrick!!!
On Thu, Jun 23, 2011 at 11:29 AM, prateek gupta wrote:
> yup, got it thanks!!!
>
>
> On Thu, Jun 23, 2011 at 11:27 AM, sunny agrawal
> wrote:
>
>> last line is
>> *in worst case k=1 only 2*n comparisons will be there hence O(n)*
>>
>>
>>
>> On Thu, Jun 23, 2011 at 11:26 AM, sunny agraw
yup, got it thanks!!!
On Thu, Jun 23, 2011 at 11:27 AM, sunny agrawal wrote:
> last line is
> *in worst case k=1 only 2*n comparisons will be there hence O(n)*
>
>
>
> On Thu, Jun 23, 2011 at 11:26 AM, sunny agrawal
> wrote:
>
>> Lets Consider the case of Naive matching in which at some shift s
last line is
*in worst case k=1 only 2*n comparisons will be there hence O(n)*
On Thu, Jun 23, 2011 at 11:26 AM, sunny agrawal wrote:
> Lets Consider the case of Naive matching in which at some shift s first k
> characters are matched and next character does not match so instead of
> starting fr
Lets Consider the case of Naive matching in which at some shift s first k
characters are matched and next character does not match so instead of
starting from s+1 shift we can safely jump to s+k because all characters of
pattern are distinct
in worst case k=1 only an comparisons will be there hence
In KMP there is a pre processing time of O(m).
which is not there in naive.
The question says to accelerate naive string matching.
On Thu, Jun 23, 2011 at 11:19 AM, Piyush Sinha wrote:
>
> Read KMP algorithm..
>
>
> On Thu, Jun 23, 2011 at 11:17 AM, prateek gupta wrote:
>
>> In naive string matc
Read KMP algorithm..
On Thu, Jun 23, 2011 at 11:17 AM, prateek gupta wrote:
> In naive string matching how can the knowledge abt. pattern that it has all
> different characters can be used to accelerate the algorithm to O(n) .
>
> --
> You received this message because you are subscribed to the
In naive string matching how can the knowledge abt. pattern that it has all
different characters can be used to accelerate the algorithm to O(n) .
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@
13 matches
Mail list logo