an array arr mountain follow property holdarrlength 3There exist 0 arrlength 1 thatarr0 arr1 arri 1 arriarri arri 1 arrarrlength 1given mountain array arr return index arr0 arr1 arri 1 arri arri 1 arrarrlength 1you solve Ologarrlength time complexity Example 1input arr 010Output 1example 2input arr 0210output 1example 3input arr 01052output 1 constraints3 arrlength 1050 arri 106arr guarantee mountain array