This algorithm is actually an excellent illustration of why clever algorithms aren't always better.
In fact the clever algorithm here is worse in basically every way imaginable. It's more complicated, limited in scope, error prone, can fail in unexpected ways, and possibly less efficient than the obvious solution.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.