DP35 最长等差数列 Longest Arithmetic Progression @geeksforgeeks
在一个有序数组里找等差数列,用3个指针,以中间指针为基准,移动前后指针。Givenasetofnumbers,findthe Lengthofthe Longest Arithmetic Progression(LLAP)init.Examples:set[]={1,7,10,15,27,29}
output=3
Thelongestarithmeticprogressionis{1,15,29}