Will the stack algorithm be considered as O(n) space complexity or in term of auxiliary complexity? I thought “no extra space used” means you cannot use recursive or iteration, or even a single temp variable, so came up a “brute force” solution even though I don’t think it will be accepted by interviewer:

```
class Solution {
public: // 0, 9, 11, 191, 202, 6776, 53235, 234432, 1234321, 12344321, 123454321, 12345654321, ...
bool isPalindrome(int x) { //120ms
#define D0(x) x%10
#define D1(x) x%100/10
#define D2(x) x%1000/100
#define D3(x) x%10000/1000
#define D4(x) x%100000/10000
#define D5(x) x%1000000/100000
#define D6(x) x%10000000/1000000
#define D7(x) x%100000000/10000000
#define D8(x) x%1000000000/100000000
#define D9(x) x%10000000000/1000000000
if (x<0) return false;
if (x<10) return true;
if (x<100) return D1(x)==D0(x);
if (x<1000) return D2(x)==D0(x); // 202
if (x<10000) return D3(x)==D0(x) && D2(x)==D1(x); //6776
if (x<100000) return D4(x)==D0(x) && D3(x)==D1(x); //53235
if (x<1000000) return D5(x)==D0(x) && D4(x)==D1(x) && D3(x)==D2(x);//234432
if (x<10000000) return D6(x)==D0(x) && D5(x)==D1(x) && D4(x)==D2(x);//1234321
if (x<100000000) return D7(x)==D0(x) && D6(x)==D1(x) && D5(x)==D2(x) && D4(x)==D3(x); //12344321
if (x<1000000000) return D8(x)==D0(x) && D7(x)==D1(x) && D6(x)==D2(x) && D5(x)==D3(x);//123454321
if (x<10000000000) return D9(x)==D0(x) && D8(x)==D1(x) && D7(x)==D2(x) && D6(x)==D3(x) && D5(x)==D4(x);//12345654321
return false;
}
};
```