โ† Societe Generale questions
CodingReported in a candidate post, Aug 2018

Print prime numbers between 1 to n

Filed under Societe Generale

The question

Write code to print prime numbers between 1 and n, starting with a brute force approach and moving to an optimized solution like the Sieve of Eratosthenes.

No write-up yet. Related questions below have one.

Related Societe Generale questions

Collected from public candidate posts and coding forums. Updated Nov 2026.