Here's mycode Anyway your solution is offline because you compress input (btw you don't need to do it if you maintain tree with pointers). Also here you can query sor[0], but looks like it's uninitialized k=m1[sor[pos-1]]; Also doesn't ind should be a power of two? Oo Thank ...
Given an unsorted sequence A={a0,a1,a2,...an-1} ofnintegers. How do I find the longest increasing sub-sequence of the given sequence. Is there any dynamic programming solution. dp,lis,query 0 f.nasim 15 years ago 13 Comments (12) Show ...