69. Sqrt(x)
All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : June 07, 2024
Last updated : July 01, 2024
Related Topics : Math, Binary Search
Acceptance Rate : 39.74 %
class Solution:
def mySqrt(self, x: int) -> int:
current = 0
while current * current <= x :
current += 1
return current - 1