Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 696 Bytes

_69. Sqrt(x).md

File metadata and controls

35 lines (24 loc) · 696 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : June 07, 2024

Last updated : July 01, 2024


Related Topics : Math, Binary Search

Acceptance Rate : 39.74 %


Solutions

Python

class Solution:
    def mySqrt(self, x: int) -> int:
        current = 0

        while current * current <= x :
            current += 1
        return current - 1