3 ms·
It's frustrating that your link to an "explanation" is an intentionally buggy implementation of the algorithm :( I understand the point of the debugging game,
by brilee 4y ago
It's frustrating that your link to an "explanation" is an intentionally buggy implementation of the algorithm :(
I understand the point of the debugging game, but in this context, a link to the solutions page would be more helpful....
- bugfix-66 4y agoReplace at = root with at = next[root] and you're done. Once you understand the forward transform, you understand that root is the LAST byte and next[root] is the FIRST byte. All the fixes in BUGFIX-66 are trivial if you understand what the code is doing, that's part of the game concept. Also, if you submit broken code, it gives you a useful hint to direct your attention to the bug. Similarly, the fix for the forward transform is to add i1, i2 = x[i1], x[i2] at the top of the less() function.