The whole array is bitonic , but the answer is 7.
int arr5 [ ] = { -1 , 0 , 1 , 2 , 3 , 1 , 0 , -1 , -10 } ; int n5 = sizeof ( arr5 ) / sizeof ( arr5 [ 0 ] ) ; cout << " Maximum ▁ Sum ▁ = ▁ " << maxSumBitonicSubArr ( arr5 , n5 ) << endl ;