human
Find the two repeating elements in a given array | Function to print repeating.
Driver code"
Solution in Python:
 Write me a code to find the two repeating elements in a given array and the other steps required?
assistant
#Here is code to find the two repeating elements in a given array and the other steps required.
 def printRepeating ( arr , size ) :
	print ( " ▁ The ▁ repeating ▁ elements ▁ are " , end = " ▁ " )
	for i in range ( 0 , size ) :
		if ( arr [ abs ( arr [ i ] ) ] > 0 ) :
			arr [ abs ( arr [ i ] ) ] = ( - 1 ) * arr [ abs ( arr [ i ] ) ]
		else :
			print ( abs ( arr [ i ] ) , end = " ▁ " )
arr = [ 4 , 2 , 4 , 5 , 2 , 3 , 1 ]
arr_size = len ( arr )
printRepeating ( arr , arr_size )