I tried solutions using binary search and Newton Method, but the fastest and simplest solution I got is this.....So I would not use it in a job interview, but definitely in my daily work.

```
from math import sqrt
class Solution(object):
def mySqrt(self, x):
"""
:type x: int
:rtype: int
"""
if x < 2:
return x
else:
return int(sqrt(x))
```