Easy C++ solution with easy logic
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool isPalindrome(int num) {\n        string strNum = to_string(num);\n        int left = 0;\n        int right = strNum.size() - 1;\n\n        while (left < right) {\n            if (strNum[left] != strNum[right]) {\n                return false;\n            }\n            left++;\n            right--;\n        }\n        return true;\n    }\n    bool isPrime(int num) {\n        if (num <= 1)\n            return false;\n        if (num <= 3)\n            return true;\n\n        if (num % 2 == 0 || num % 3 == 0)\n            return false;\n\n        for (int i = 5; i * i <= num; i += 6) {\n            if (num % i == 0 || num % (i + 2) == 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    int primePalindrome(int n) {\n        if(n==1 || n==2) return 2;\n        int i;\n        if(n%2 == 0) i = n+1;\n        else i=n;\n        while(true){\n            if(isPalindrome(i) && isPrime(i)) return i;\n            i += 2;  \n\t\t\t\n            if(i > 1e7 && i < 1e8) i = 1e8 + 1;\n            if(i > 1e5 && i < 1e6) i = 1e6 + 1;\n            if(i > 1e3 && i < 1e4) i = 1e4 + 1;\n            if(i > 11 && i < 100) i = 101;\n        }\n        return -1;\n    }\n};\n```
['Math', 'Number Theory', 'C++']