human
Square root of an integer | Returns floor of square root of x.
Base cases.
Do Binary Search for floor ( sqrt ( x ) ).
If x is a perfect square.
Since we need floor , we update answer when mid * mid is smaller than x , and move closer to sqrt ( x ).
If mid * mid is greater than x.
driver code"
Solution in Python:

=====
Write me a code to square root of an integer and the other steps required?
assistant
#Here is code to square root of an integer and the other steps required.
 def floorSqrt ( x ) :
	if ( x == 0 or x == 1 ) :
		return x
	start = 1
	end = x
	while ( start <= end ) :
		mid = ( start + end ) // 2
		if ( mid * mid == x ) :
			return mid
		if ( mid * mid < x ) :
			start = mid + 1
			ans = mid
		else :
			end = mid - 1
	return ans
x = 11
print ( floorSqrt ( x ) )