give array num n integer task check nondecrease modifying elementwe define array nondecrease numsi numsi 1 hold 0base 0 n 2 Example 1input num 423output trueexplanation you modify 4 1 nondecrease arrayExample 2input num 421output falseexplanation you nondecrease array modify element Constraintsn numslength1 n 104105 numsi 105