Prime numbers and the sieve
Check primes efficiently and list primes up to n.
Lesson complete
Nice work. Replay it any time.
All courses
About this topic
Check primes efficiently and list primes up to n.
Part of Coding Tests: Pseudocode, Output Tracing & Patterns: 23 topics, 5 free.
More topics in this course
- How to dry-run code
- Reading company-test pseudocode
- Operator traps: ++, %, /, &&, bitwise
- Digit problems: reverse, palindrome, Armstrong
- GCD, LCM and number theory basics
- Pattern printing
- Array basics: max, second largest, rotate
- Frequency, duplicates and missing number