Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-07-14 Thread Anand
http://codepad.org/EWcoJ2c3 Here is solution for find the Longest Increasing subseqence. I tried two approach. 1. Find the suboptimal solution using O(n) complexity thereby optimal solution for the problem reaches O(n^2). 2. Find the suboptimal solution using O(logn) complexity thereby optimal

Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-06-05 Thread Anand
http://codepad.org/NDAeIpxR Here is code for it On Sat, May 29, 2010 at 7:45 PM, Anurag Sharma anuragvic...@gmail.comwrote: @pawan Will it not take O(n^2) time then. What he is talking about is solving it in O(nlogn) time Anurag Sharma http://anuragsharma-sun.blogspot.com/ On Sat, May

Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-05-29 Thread Nikhil Agarwal
Check: http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence On Sat, May 29, 2010 at 4:15 AM, Amir hossein Shahriari amir.hossein.shahri...@gmail.com wrote: A hint from Introduction to algorithms on this problem: Observe that the last element of a candidate subsequence of

Re: [algogeeks] Longest Increasing Subsequence in O(nlogn)

2010-05-28 Thread Anand
Hi Amit, Could you just elaborate which algorithm are you talking about. Is it KMP algorithm for string matching are looking at. Thanks, Anand On Fri, May 28, 2010 at 8:14 AM, amit amitjaspal...@gmail.com wrote: Hi , Can anyone plz explain this algorithm taking some example. I read this on