human
Check if two numbers are bit rotations of each other or not | function to check if two numbers are equal after bit rotation.
x64 has concatenation of x with itself ..
comapring only last 32 bits.
right shift by 1 unit.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to check if two numbers are bit rotations of each other or not and the other steps required.
 def isRotation ( x , y ) :
	x64 = x | ( x << 32 )
	while ( x64 >= y ) :
		if ( ( x64 ) == y ) :
			return True
		x64 >>= 1
	return False
if __name__ == " _ _ main _ _ " :
	x = 122
	y = 2147483678
	if ( isRotation ( x , y ) == False ) :
		print ( " yes " )
	else :
		print ( " no " )