-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Description
Your LeetCode username
Category of the bug
- Question
- Solution
- Language
- [yes ] Missing Test Cases
Description of the bug
The question states to calculate x raised to power n. And when x=0 and n=0. The expected answer returns 1.00000. So, this seems to be invalid test case in the question.
Code you used for Submit/Run operation
// Two Sum
class Solution {
public:
double myPow(double x, int n) {
if(x ==0 && n ==0)
return -1;
return pow(x, double(n));
}
};
Language used for code
Expected behavior
At n = 0 and x = 0, as Pow(0,0) is undefined. So, testcase must be removed.