DEV Community

[Comment from a deleted post]
 
bgadrian profile image
Adrian B.G.

What, exactly, is better code? Is it optimized for readability and understandability, or for performance?

In this case is none of them, like I said in my first comment, it is a non-standard implementation (recursive, while most of the examples I could find are iterative), and less performant.