Nasdaq Interview Question

Technical question on finding prime numbers