5.Sqrt(x)
Implement int sqrt(int x).
Solution I: (Brute Force)
Time Complexity: O( √n )
Solution II: (Binary Search)
Time Complexity: O(log n)
Last updated
Implement int sqrt(int x).
Time Complexity: O( √n )
Time Complexity: O(log n)
Last updated