human
Count smaller elements present in the array for each array element | Function to count for each array element , the number of elements that are smaller than that element.
Traverse the array.
Stores the count.
Traverse the array.
Increment count.
Print the count of smaller elements for the current element.
Driver Code"
Solution in Python:

=====
Can you provide a code to count smaller elements present in the array for each array element and the other steps required?
assistant
#Here is code to count smaller elements present in the array for each array element and the other steps required.
 def smallerNumbers ( arr , N ) :
	for i in range ( N ) :
		count = 0
		for j in range ( N ) :
			if ( arr [ j ] < arr [ i ] ) :
				count += 1
		print ( count , end = " ▁ " )
if __name__ == " _ _ main _ _ " :
	arr = [ 3 , 4 , 1 , 1 , 2 ]
	N = len ( arr )
	smallerNumbers ( arr , N )