Driver program to test above
int main ( ) { int arr [ ] = { 2 , 5 , 6 , 3 , 7 , 6 , 5 , 8 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Maximum ▁ length ▁ subsequence ▁ = ▁ " << maxLenSub ( arr , n ) ; return 0 ; }