Anonymous user
Pythagorean triples/Java/Brute force primitives: Difference between revisions
Pythagorean triples/Java/Brute force primitives (view source)
Revision as of 17:28, 15 July 2011
, 12 years agoIncredibly slight optimization (took the runtime of a 10k perimeter limit from 90 seconds to 89 seconds on this computer)
m (Extra notes and comments, move a comparison so it is only calculated if needed.) |
m (Incredibly slight optimization (took the runtime of a 10k perimeter limit from 90 seconds to 89 seconds on this computer)) |
||
Line 95:
}else if (compare == 0){
Triple prim = new Triple(a, b, c);
if(trips.add(prim)){
addAllScales(prim); //add its scales
}
}
}
|