Skip to content

Commit 3899c3b

Browse files
committed
add func in 69.py
1 parent abc649f commit 3899c3b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

py_solution/69. Sqrt(x).py

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ def mySqrt(self, x):
1010
return self.mySqrt(-x)
1111
start = 1
1212
start = (x / start + start) / 2
13-
# Newton's method
13+
# TODO: Newton's method
14+
15+
def mySqrt2(self, x):
16+
import math
17+
return int(math.sqrt(x))

0 commit comments

Comments
 (0)