Nasdaq interview question

Finding prime numbers - leetcode style