Leetcode sqrt newton method