Ok,

but for non negative values it should work.


Gene wrote:
> 
> 
> This doesn't work in many cases.  Consider
> 
> n = 1, N = -1, a[0] = -1 .  (Algorithm says no, subseq exists.)
> 
> Or a more interesting example,
> 
> n = 4, N = 2, a = [1, -2, 5, -2]  (Again alg says no, subseq exists.)
> 
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to