I think its the stricter version of LIS , where when you see for the increasing number , just see the number which is greater with the number k than the previous one.
Thanks , Rajesh Pandey On Fri, Nov 16, 2012 at 7:55 PM, bharat b <[email protected]>wrote: > @deepak : all the numbers in the array should be continuous or those k > elemenst can be any where ? > > > On Thu, Nov 15, 2012 at 2:18 PM, deepak mishra <[email protected]>wrote: > >> >> >> On Thursday, 7 July 2011 23:43:38 UTC+5:30, Piyush Sinha wrote: >>> >>> Given an array of integers A, give an algorithm to find the longest >>> Arithmetic progression in it, i.e find a sequence i1 < i2 < … < ik, >>> such that >>> >>> A[i1], A[i2], …, A[ik] forms an arithmetic progression, and k is the >>> largest possible. >>> >>> The sequence S1, S2, …, Sk is called an arithmetic progression if >>> >>> Sj+1 – Sj is a constant. >>> >>> -- >>> *Piyush Sinha* >>> *IIIT, Allahabad* >>> *+91-8792136657* >>> *+91-7483122727* >>> *https://www.facebook.com/**profile.php?id=100000655377926<https://www.facebook.com/profile.php?id=100000655377926>* >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/algogeeks/-/umM2YKQz-9oJ. >> >> 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?hl=en. >> > > -- > 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?hl=en. > -- 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?hl=en.
