Practice Prime Palindrome
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given an integer n, return the smallest prime palindrome greater than or equal to n. An integer is prime if it has exactly two divisors: 1 and itself. Note that 1 is not a prime number. An integer is a palindrome if it reads the same from left to right as it does from right to left. The test cases are generated so that the answer always exists and is in the range [2, 2 * 10^8].
Source: Prime Palindrome on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
n = 6
7
# Example 2
n = 8
11
# Example 3
n = 13
101
Constraints
Related LeetCode Problems
Practice more problems similar to Prime Palindrome.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.