摘要:
Implement pow(x,n).Recursive solution is easier to understand. It uses the divide-and-conquer approach, which also runs intime. The formula is shown below:And the code is quite simple and straightforward.Code:class Solution {public: double pow(double x, int n) { if(n==0) return ... 阅读全文
posted @ 2013-11-26 18:02
WinsCoder
阅读(336)
评论(0)
推荐(0)

浙公网安备 33010602011771号