Simplest Solution Out There
Steps
We need to check for 3 Steps only here

Is the number a palindrome?

As the constraints are only upto 1e8, we can simply check this by converting the numb
# Steps
- We need to check for 3 Steps only here
1. Is the number a palindrome? 
    - As the constraints are only upto `1e8`, we can simply check this by converting the number to a string and then checking whether it is the same as its reverse.
2. Is the number a prime?
    - We can simply use the brute force method here by checking whether the number has a multiple from `2` upto the square root of the number.
3. If both of the above conditions are true then return that number else check these conditions for the next number.
---


# Implementation
```cpp []
class Solution {
public:
    bool isPalindrome(int n) {
        string s = to_string(n);
        string temp = s; reverse(temp.begin() , temp.end()); 
        return s == temp;
    }

    bool isPrime(int num) {
        if (num < 2) return false;
        for (int i = 2; i <= sqrt(num); i++) 
            if (num % i == 0) return false;
            return true;
        }

    int primePalindrome(int n) {
        for (int i = n; i < 200000000; i++) {
            if (isPalindrome(i) && isPrime(i)) return i; 
        }
        return 1e8;
    }
};

['C++']