This website works better with JavaScript.
Home
Explore
Help
Sign In
mort
/
uni
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
improved memory usage
master
mortie
7 years ago
parent
d7741a53c0
commit
8a69baef5d
1 changed files
with
1 additions
and
1 deletions
Split View
Show Diff Stats
1
1
inf2440/hw2/Sieve.java
+ 1
- 1
inf2440/hw2/Sieve.java
View File
@@ -27,7 +27,7 @@ class Sieve {
public int[] getPrimes() {
if (primes == null) {
primes = new int[(maxNum / (
int)Math.log(maxNum)) * 2
];
primes = new int[(maxNum / (
(int)Math.log(maxNum) - 1)) + 1
];
int i = 0;
primes[i++] = 2;
Write
Preview
Loading…
Cancel
Save