2 ms·
Gosh, I never thought I'd see this "in the wild"! I would have a hard time understanding why this finishes with the "updates" in the order expected instead of
by ColinWright 2y ago
Gosh, I never thought I'd see this "in the wild"!
I would have a hard time understanding why this finishes with the "updates" in the order expected instead of the opposite order, and I'm intrigued. In the paper it just seems to counter-intuitive to me that if the comparison is that way round then the items get swapped ... if I found this in code I was auditing then I'd spent a long time trying to work out what was going on.
Thank you.
- reedf1 2y agoYes, not something I would write in production code. But very easy for me to think about in a stream of consciousness. Usually I complete the above challenges in about 5-10mins.