feliperibeiro
Joined 14 years ago
Karma
10
Submissions
12
Member since
Jul 4
Joined 14 years ago
https://github.com/felipernb/algorithms.js/commit/e5a04f9ad0...
From the wiki (https://github.com/felipernb/algorithms.js/wiki):
The intention is to blend academic concepts with the
JavaScript bits of insanity, applying Atwood's Law to CS101. 34 var tmp = a;
35 a = Math.max(a, b);
36 b = Math.min(tmp, b);
37 if (a % b === 0) return b;
to avoid the unnecessary repetitions if b is already the GCDSo, as companies like Google and Facebook have so many applications, they're much more concerned about false positives than false negatives.