Technical2026-08-11
Find all prime numbers up to n
AI-Expanded — inferred from the question title, not from the original candidate report
Given an integer $n$, write a function that returns a list of all prime numbers less than or equal to $n$. Optimize your solution to handle large values of $n$ efficiently, ideally using an algorithm with a time complexity better than $O(n\sqrt{n})$.
Context & Summary
The interview focused on project work, C++ concepts, OOP principles, and basic data structure problems.
💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.
Loading editor...
AI can automatically infer and generate example test cases for this question based on standard algorithmic constraints.
InterviewDigest