o(n) is the best sol known to me..
On Sun, Sep 6, 2009 at 1:54 PM, Pramod Negi <[email protected]> wrote: > i guess sorting will do the work. > any other constraint?? > > > On Sun, Sep 6, 2009 at 9:52 AM, p0r$h <[email protected]> wrote: > >> >> Given an array of integers A[N], find the maximum value of (j-k) such >> that A[k] <= A[j] & j>k. >> I am looking for a solution with time complexity better than O(N^2). >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. 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 -~----------~----~----~----~------~----~------~--~---
