geek4u,
I agree with you that the original problem description is
not very clear, but I guess by
"sequence of consecutive integers" he means a substring of the sequence
(not just a sequence). If the problem is to find a subsequence (without
any restriction on the length of
the subsequ
@aj . i understand ur approach , but i gave a suggestion , as it was no whr mentioned clearly( abt the substring) coutesy the original problem defintion.On 3/21/06,
aj <[EMAIL PROTECTED]> wrote:
--~--~-~--~~~---~--~~
You received this message because you are subsc
hey syed,
where are you right now? me at EPFL, switzerland. By the
way your solution is same as mine (dynamic programming one).
Aj
B.Tech (CSE), IIT Kanpur '03
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
Sorry. I did not fully understand your suggestion.
But one thing for certain - you might have to include negative numbers
also in your subsequence as it might be accompanied by huge positive
numbers before & after.
Solution:
0. given array A[0..n]
1. find cumulative sums in B[0..n] can also be d
Ajay Kr. Mishra,
well if you don't want the substring and
only interested in subsequence (although I guess the original problem
was to find a substring), then it is a trivial problem.
take all the positive values from sequence (say there are k such
values). If k >= L, t