Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by hintymad on Wednesday April 05, 2023 @01:13AM
(#35449584)
What a tragedy. I remember Bob’s code that generates certain numbers: https://www.beust.com/weblog/coding-challenge/. Bob’s code is in Java, yet uses clever backtracing techniques to achieve the best performance among many solutions in all kinds of languanges.
[ Parent
| on HN ]
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by somekyle on Wednesday April 05, 2023 @01:52PM
(#35457968)
Hah! I was just remembering the exact same thing. His fingerprints are all over my development as a professional Java programmer.
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by scythe on Wednesday April 05, 2023 @01:52PM
(#35457970)
I was curious about this, but it looks like the links to crazybob.org now 404.
It seems to me like the trick would be to find a way to generate, in order, the numbers you can't print, then you just print the gaps between them.
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by hintymad on Wednesday April 05, 2023 @02:15PM
(#35458324)
Huh, it seems Bob further optimized his code. The one I remember used the similar approach, but employed a doubly-linked list for backtracking. The pleasant surprise that I got from his code was that recursion plus a linked list still beat those "faster" languages, a classical example of optimizing algorithms first, as beautifully argued in Steven Skiena's Algorithm Design Manual
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by bdwedding on Wednesday April 05, 2023 @05:04PM
(#35460361)
Here's the one you were thinking of. This was the one "further optimized", not the first one posted:
https://web.archive.org/web/20090723015302/http://crazybob.o...
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by hintymad on Wednesday April 05, 2023 @05:24PM
(#35460560)
Ah, yes. Thanks!
Re:Bob Lee, Former CTO Square, Creator of CashApp, Stabbed t...
by bdwedding on Wednesday April 05, 2023 @05:21PM
(#35460535)
I ported his code to C++, the linked list version and the other recursive version. Then I removed the recursion. For me, the linked list is 2X slower and the non-recursive version using a stack is slightly faster than his original version.
https://gist.github.com/bwedding/19c1bd0e967cfb62084fabdd6bf...