摘要:
题目链接Implement pow(x, n).主要利用x^2n = (x^n)*(x^n), x^2n+1 = (x^n)*(x^n)*x注意n是负数,对其取反时,可能会溢出其实0^0(都是整数)是未定义的,因为0^0 = 0^1 / 0^1 = 0 / 0, 0作为除数是未定义的,可以参考维基百... 阅读全文
摘要:
Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C u... 阅读全文