Post AvZIheyWQPHtkGiikC by [email protected] | |
More posts by [email protected] | |
Post #AvZIhekhFoEF3OFgC8 by [email protected] | |
0 likes, 0 repeats | |
Something that would definitely make me think twice about an engineering candid… | |
Post #AvZIhesUmoT1RZtuLo by [email protected] | |
0 likes, 0 repeats | |
For example, can you figure out what this function does? | |
Post #AvZIheyWQPHtkGiikC by [email protected] | |
0 likes, 0 repeats | |
@jasongorman I stopped trying when I saw the recursion...And just not using if-… | |
Post #AvZIhf5xyjF67MCfLc by [email protected] | |
0 likes, 0 repeats | |
@kly It's apparently O(log(N)). Which, for a number with a billion digits w… | |
Post #AvZIhfBHexUoNqgudU by [email protected] | |
0 likes, 0 repeats | |
@jasongorman That would be a remarkably long long. | |
Post #AvZIhg3WPIsh644EAy by [email protected] | |
0 likes, 0 repeats | |
This, BTW, was given by the author as an example of a "simple solution&quo… | |
Post #AvZIhghE1gdl5Cdw3s by [email protected] | |
0 likes, 0 repeats | |
So it's hard to understand *and* it doesn't work. | |
Post #AvZIhhInlyhKxkDwdE by [email protected] | |
0 likes, 0 repeats | |
Just tested on a range of 0 -> 10,000, and it's wrong 1.4% of the time. | |
Post #AvZIhhyHHlsJ2Nd4HQ by [email protected] | |
0 likes, 0 repeats | |
This, BTW, is why recursion is banned on many critical systems (e.g., NASA cont… | |
Post #AvZIhik8Pq9jQo1HsG by [email protected] | |
0 likes, 0 repeats | |
Now getting the sentiment of my original post confirmed by the code's autho… | |
Post #AvZIhyTLw0EsDOI6wC by [email protected] | |
0 likes, 0 repeats | |
@kly True. It's very efficient on non-existent ints. |