Your task is to calculate sum of primes present as digits of given number N.
Explaination: 3 is a prime number. It
is present 3 times. So 3+3+3 = 9.
Explaination: Neither 6 nor 8 is a
You do not need to read input or print anything. Your task is to complete the function primeSum() which takes N as input parameter and returns the sum of all the prime digits present in the number N.
Expected Time Complexity: O(logN) Expected Auxiliary Space: O(1)