Check Palindromic Digits in Every Required Base
Company: Google
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Other
### Problem
An integer `n` is strictly palindromic if its representation reads the same forward and backward in every integer base from 2 through `n - 2`, inclusive. Return whether `n` has this property.
```cpp
class Solution {
public:
bool isStrictlyPalindromic(int n);
};
```
### Examples
**Example 1:**
```text
Input: n = 5
Output: false
Explanation: In base 3, five is 12, which is not a palindrome.
```
**Example 2:**
```text
Input: n = 10
Output: false
Explanation: In base 8, ten is 12, so one required base already fails.
```
### Constraints
- `4 <= n <= 100000`.
### Clarifying Questions
- Must every required base work? Yes; one failure makes the answer false.
- Is base `n - 2` included? Yes.
- Which inputs are allowed? Integers from 4 through 100000.
```hint Check the boundary
A universal condition can be disproved by one counterexample.
```
Overview: Determine whether a number is palindromic in every integer base from 2 through n minus 2, inclusive.