[Leetcode]Sqrt(x)

Implement int sqrt(int x).code Compute and return the square root of x.it class Solution { public: /*algorithm: binary search use x/m < m instead of x < m*m to prevent overflow */
本站公眾號
   歡迎關注本站公眾號,獲取更多信息