human
Number of times Maximum and minimum value updated during traversal of array | Function to find the count the number of times maximum and minimum value updated.
Update the maximum and minimum values during traversal.
Driver code"
Solution in Python:

=====
Write me a code to number of times Maximum and minimum value updated during traversal of array and the other steps required?
assistant
#Here is code to number of times Maximum and minimum value updated during traversal of array and the other steps required.
 def maximumUpdates ( arr ) :
	min = arr [ 0 ]
	max = arr [ 0 ]
	minCount , maxCount = 1 , 1
	for arr in arr :
		if arr > max :
			maxCount += 1
			max = arr
		if arr < min :
			minCount += 1 ;
			min = arr
	print ( " Number ▁ of ▁ times ▁ maximum ▁ " , end = " " )
	print ( " value ▁ updated ▁ = ▁ " , maxCount )
	print ( " Number ▁ of ▁ times ▁ minimum ▁ " , end = " " )
	print ( " value ▁ updated ▁ = ▁ " , minCount )
if __name__ == " _ _ main _ _ " :
	arr = [ 10 , 5 , 20 , 22 ]
	maximumUpdates ( arr )