The whole array is bitonic , but the answer is 7.
let arr5 = [ - 1 , 0 , 1 , 2 , 3 , 1 , 0 , - 1 , - 10 ] ; let n5 = arr5 . length ; document . write ( " " + maxSumBitonicSubArr ( arr5 , n5 ) + " " ) ;