Given a number N, find if N can be expressed as a + b such that a and b are prime. Note: If [a, b] is one solution with a <= b, and [c, d] is another solution with c <= d, and a < c then [a, b] is considered as our answer.
Input:N = 8Output:3 5Explanation:3 and 5 are both prime and they
add up to 8.
Input:N = 3Output:-1 -1Explanation:There are no solutions to the number 3.
You don't need to read input or print anything. Your task is to complete the function getPrimes() which takes an integer n as input and returns (a,b) as an array of size 2. Note: If no value of (a,b) satisfy the condition return (-1,-1) as an array of size 2.
Expected Time Complexity: O(N*loglog(N)) Expected Auxiliary Space: O(N)