Check if a number can be expressed as sum of two primes
Check if a number can be expressed as sum of two primes
Write a function to check if a given even number (greater than 2) can be expressed as the sum of two prime numbers (Goldbach's conjecture).
Test Cases5 test cases
Test Cases:
Showing 2 of 3 sample test casesTest Case 1
Input:
{
"n": 10
}Expected Output:
true
Test Case 2
Input:
{
"n": 14
}Expected Output:
true
+1 more sample test cases (will be validated when you run code)
Sign in to save your progress and mark problems as solved.
Code Editor
Loading editor...
Problem discussion
(0)Join the discussion — login to comment and help other developers.
Login to comment