Minimum steps required to reduce all the elements of the array to zero | Function to return the minimum steps required to reduce all the elements to 0 ; Maximum element from the array ; Driver code
def minSteps ( arr , n ) : NEW_LINE INDENT maxVal = max ( arr ) NEW_LINE return maxVal NEW_LINE DEDENT arr = [ 1 , 2 , 4 ] NEW_LINE n = len ( arr ) NEW_LINE print ( minSteps ( arr , n ) ) NEW_LINE