Fidelity Investments interview question

Describe an algorithm to find the first 20 prime numbers.

Interview Answer

Anonymous

24 Jan 2014

To limit to 20 you can include a counter. Then use the sieve of Eratosthenes.

1