Amazon Interview Question

Find all the prime numbers until n

Interview Answer

Anonymous

Jan 26, 2023

brute force until sqrt n and then optimize to use sieve of Eratosthenes