human
Mode | Function that sort input array a [ ] and calculate mode and median using counting sort ..
variable to store max of input array which will to have size of count array.
auxiliary ( count ) array to store count . Initialize count array as 0. Size of count array will be equal to ( max + 1 ) ..
Store count of each element of input array.
mode is the index with maximum count.
Driver Code"
Solution in Python:

=====
What is a code to mode and the other steps required?
assistant
#Here is code to mode and the other steps required.
 def printMode ( a , n ) :
	max_element = max ( a )
	t = max_element + 1
	count = [ 0 ] * t
	for i in range ( t ) :
		count [ i ] = 0
	for i in range ( n ) :
		count [ a [ i ] ] += 1
	mode = 0
	k = count [ 0 ]
	for i in range ( 1 , t ) :
		if ( count [ i ] > k ) :
			k = count [ i ]
			mode = i
	print ( " mode ▁ = ▁ " , mode )
if __name__ == " _ _ main _ _ " :
	a = [ 1 , 4 , 1 , 2 , 7 , 1 , 2 , 5 , 3 , 6 ]
	n = len ( a )
	printMode ( a , n )