buddy i said that kadane's algo(max subsum) wouldn't work......

On Feb 25, 1:31 pm, Ashish Goel <ashg...@gmail.com> wrote:
> max subsum problem
> Best Regards
> Ashish Goel
> "Think positive and find fuel in failure"
> +919985813081
> +919966006652
>
> On Sat, Feb 25, 2012 at 1:03 PM, karthikeya s 
> <karthikeya.a...@gmail.com>wrote:
>
>
>
>
>
>
>
> > You have a circular track containing fuel pits at irregular intervals.
> > The total amount of fuel available from all the pits together is just
> > sufficient to travel round the track and finish where you started.
> > Given the the circuit perimeter, list of each fuel pit location and
> > the amount of fuel they contain, find the optimal start point on the
> > track such that you never run out of fuel and complete circuit.
>
> > my logic:
> > we can use an array having element as
> > fuel(in km)-dist to next pit
>
> > so now aim is to traverse the array as always having some +ve
> > resultant sum.....nd plz we cant use here kadane's algo.....there are
> > cases in which it will not hold here....
>
> > --
> > 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
> > algogeeks+unsubscr...@googlegroups.com.
> > 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 post to this group, send email to algogeeks@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.

Reply via email to