Re: [algogeeks] Re: Longest increasing subsequence

2011-01-03 Thread coolfrog$
@anand http://anandtechblog.blogspot.com/2010/07/longest-increasing-subsequence.html there is problem with your blog... plz check it . its very nice.. and very informative... but it no opening check it plz... On Fri, Dec 31, 2010 at 10:18 PM, Anand wrote: > @Nikhil, > > I searched through th

[algogeeks] Re: Longest increasing subsequence

2011-01-02 Thread Prims
Hello Anand I am getting the error "Blog not found" . Could you please provide me the correct link. -Prims On Dec 31 2010, 1:44 pm, Anand wrote: > Longest increasing subsequence using segment tree with O(nlogn) > > http://anandtechblog.blogspot.com/2010/12/longest-increasing-subseque... > > > >

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread Nikhil Agarwal
https://groups.google.com/group/algogeeks/browse_thread/thread/b20cd8160a8e8f92?hl=en On Fri, Dec 31, 2010 at 10:18 PM, Anand wrote: > @Nikhil, > > I searched through the group for the answer but didn't find one so I stated > again. > > > On Fri, Dec 31, 2010 at 1:39 AM, Nikhil Agarwal > wrote:

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread Anand
@Nikhil, I searched through the group for the answer but didn't find one so I stated again. On Fri, Dec 31, 2010 at 1:39 AM, Nikhil Agarwal wrote: > I guess this has already been discussed here many times.Please check in the > group archives. > > > On Fri, Dec 31, 2010 at 2:14 PM, Anand wrote:

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread Nikhil Agarwal
I guess this has already been discussed here many times.Please check in the group archives. On Fri, Dec 31, 2010 at 2:14 PM, Anand wrote: > Longest increasing subsequence using segment tree with O(nlogn) > > > http://anandtechblog.blogspot.com/2010/12/longest-increasing-subsequence-using.html >

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread Anand
Longest increasing subsequence using segment tree with O(nlogn) http://anandtechblog.blogspot.com/2010/12/longest-increasing-subsequence-using.html On Thu, Dec 30, 2010 at 11:27 PM, juver++ wrote: > And of course simple binary search. > > -- > You received this message because you are subscribe

[algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread suhash
Another variation can be finding the longest subsequence such that the 'absolute' difference between any 2 consecutive elements of the sequence you choose is atmost 'k'. Here, query range is [a[i]-k,a[i]+k]. On Dec 31, 1:01 pm, suhash wrote: > @juver++: yeah! i get that! i thought the segment tre

[algogeeks] Re: Longest increasing subsequence

2010-12-31 Thread suhash
@juver++: yeah! i get that! i thought the segment tree approach was worth mentioning because more general problems can be solved using this. eg:- Find the longest increasing subsequence such that the difference between any 2 consecutive elements of the sequence you choose is atmost 'k'. (Instead of

[algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread juver++
And of course simple binary search. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For mo

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread Naveen Kumar
http://en.wikipedia.org/wiki/Longest_increasing_subsequence On Fri, Dec 31, 2010 at 12:29 PM, juver++ wrote: > There is no need in segment tree. It can be solved using any balanced bst. > In C++ it can be std::set. > > -- > You received this message because you are subscribed to the Google Group

[algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread juver++
There is no need in segment tree. It can be solved using any balanced bst. In C++ it can be std::set. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this g

[algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread suhash
Btw...this is O(n*log n) (query and update in the segment tree each take O(log n)) On Dec 31, 11:26 am, suhash wrote: > For longest increasing subword, this O(n) solution is correct. > > For longest increasing subsequence, it can be found in O(n*log n) > using binary search or segment tree. > Her

Re: [algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread Anand
Longest increasing sequence: Given a sequence of n real numbers A(1) ... A(n), determine a subsequence (not necessarily contiguous) of maximum length in which the values in the subsequence form a strictly increasing sequence. Input sequence : arr[]={2, 4, 3,-2,6,7}; Output sequence: Number:7 i

[algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread suhash
For longest increasing subword, this O(n) solution is correct. For longest increasing subsequence, it can be found in O(n*log n) using binary search or segment tree. Here is the segment tree approach. Assume input is a[1n] Let the property of the segment tree be: stores maximum value in a ran

[algogeeks] Re: Longest increasing subsequence

2010-12-30 Thread suhash
@bhupendra: I think you are talking about longest increasing subword. But, i think the question is longest increasing subsequence! definitions: subword: a contiguous sequence of characters. eg: 'abb' is a subword of 'cabber' subsequence: a sequence of characters of the original string, with order p

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

2010-05-28 Thread amit
Hi , I am looking for a Longest Increasing Subsequence Algorithm in O(nlogn) time. i.e given an array of integers we have to find the longest subsequence of it that is always increasing e.g [3,5,2,7,12,1] ---> Ans[3,5,7,12] On May 28, 9:19 pm, Anand wrote: > Hi Amit, > > Could you just elaborat