You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an integer x, find the square root of x. If x is not a perfect square, then return floor(√x).
For example,
if x = 5, The answer should be 2 which is the floor value of √5.
The approach that will be used for solving the above problem is not going to be a straight forward Math.sqrt(). Instead we will be using Binary Search to find the square root of a number in the most optimised way.