摘要:
Problem:Implement pow(x,n).Analysis:Notice n may be negative numbers.Simply use for loop to implement is okay when n is small. When n is large enough, it may cause Time Limit Exceeded error. In this way, the time complexity is O(n).There's a recursive implementation method can reduce the complex 阅读全文
posted @ 2013-05-19 11:18
freeneng
阅读(151)
评论(0)
推荐(0)