primes
Objective(s): Practice manipulating the elements of an array.
Given a boolean array that represents integers from 1-n
, mark all of the prime numbers true
.
For example, if n = 5 then nums would be [false, true, true, false, true]. This is because each position represents the numbers 1, 2, 3, 4, 5 where 2, 3, and 5 are primes.
We may see this problem in class, and we will use the Sieve of Erastosthenes algorithm to find the primes.
Competition Times (Competition has ended - the times are no longer updated)
Student | Time (ns) |
---|---|
alexz5 | 5594823 |
anhv03 | 6744219 |
daniel | 7743385 |
dyland | 8368618 |
jihoon | 10386316 |
arthur | 10930580 |
shawnz | 11368306 |
noelle | 11563646 |
alaina | 11877440 |
charis | 12419067 |
Type your solution
Skills Practiced:
3.C
3.D
4.A
4.B
Saved
Saved