5 ms·
Anecdote: I once suggested a change to the java standard library to change a O(n) algo into a O(1) algo. Now, more than 10 years later, it's still the O(n) (I
by toolslive 8y ago
Anecdote:
I once suggested a change to the java standard library to change a O(n) algo into a O(1) algo. Now, more than 10 years later, it's still the O(n) (I just checked the std lib's source code). Nobody cares.
- tpxl 8y agoThis sounds interesting, can you expand a bit?
- toolslive 8y agohttps://www.zgrepcode.com/java/oracle/jdk-8u181/java/lang/long.java#L-1445 https://www.zgrepcode.com/java/oracle/jdk-8u181/java/lang/lo... can be done via De Bruijn graphs as explained here: https://incubaid.wordpress.com/2012/01/24/number-of-trailing-zeroes/ https://incubaid.wordpress.com/2012/01/24/number-of-trailing...