LeetCode OJ
Problems
Pick One!
Submissions
Sign up
Sign in
Sqrt(x)
AC Rate: 276/1247
My Submissions
Implement
int sqrt(int x)
.
Compute and return the square root of
x
.
C++
Java
class Solution { public: int sqrt(int x) { // Start typing your C/C++ solution below // DO NOT write int main() function } };
public class Solution { public int sqrt(int x) { // Start typing your Java solution below // DO NOT write main() function } }
Submit Solution
You have not signed in, cannot submit your code.
Send Feedback