give array integer arr return true valid mountain arrayrecall arr mountain array ifarrlength 3There exist 0 arrlength 1 thatarr0 arr1 arri 1 arriarri arri 1 arrarrlength 1 Example 1input arr 21output falseexample 2Input arr 355output falseexample 3input arr 0321output true Constraints1 arrlength 1040 arri 104