you give array positive integer arr Perform operation possibly arr satisfie conditionsThe value element arr 1the absolute difference 2 adjacent element equal 1 in word absarri arri 1 1 1 arrlength 0indexed absx absolute value xThere 2 type operation perform number timesdecrease value element arr small positive integerrearrange element arr orderreturn maximum possible value element arr perform operation satisfy condition Example 1input arr 22121output 2explanation we satisfy condition rearrange arr 12221the large element arr 2Example 2Input arr 10011000output 3Explanation one possible way satisfy condition following1 Rearrange arr 110010002 Decrease value second element 23 Decrease value element 3Now arr 123 satisfie conditionsthe large element arr 3Example 3Input arr 12345output 5explanation the array satisfy condition large element 5 Constraints1 arrlength 1051 arri 109