Random Problem
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
@@ -0,0 +1,8 @@
class Solution {
public:
double myPow(double x, int n) {
if (n == 0) return 1;
if (n < 0) return 1 / x * myPow(1 / x, -(n + 1));
return (n % 2 == 0) ? myPow(x * x, n / 2) : x * myPow(x * x, n / 2);
}
};
@@ -65,6 +65,7 @@
for solving problems.
| 0047 | Medium | [Permutations II ](Problems/0047.cpp) |
| 0048 | Medium | [Rotate Image](Problems/0048.cpp) |
| 0049 | Medium | [Group Anagrams](Problems/0049.cpp) |
| 0050 | Medium | [Pow(x, n)](Problems/0050.cpp) |
| 0053 | Medium | [Maximum Subarray](Problems/0053.cpp) |
| 0054 | Medium | [Spiral Matrix](Problems/0054.cpp) |
| 0055 | Medium | [Jump Game](Problems/0055.cpp) |