摘要:
Problem:Implementint sqrt(int x).Compute and return the square root ofx.Analysis:If we simply use the naive algorithm to go through all the numbers from 0 until the square root, it will exceed the time limit. The hero is binary search.We want such a number between 0 and n inclusively that x*x n. No. 阅读全文
posted @ 2013-07-25 05:43
freeneng
阅读(240)
评论(0)
推荐(0)
浙公网安备 33010602011771号