Driver program to test above
int main ( ) { int arr [ ] = { 1 , 2 , 3 , 4 , 5 , 3 , 2 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Longest ▁ length ▁ subsequence ▁ = ▁ " << longLenSub ( arr , n ) ; return 0 ; }