Sure Tiago. There’s point in everything you said, no denying that. The only thing offbeat about the article was the addressal of these edge cases.
A reader might be tempted to use the explained algorithm right away, but it’s always better to warn them about the caveats associated with using them.

At the culmination of your article, you could’ve instilled curiosity in the readers by saying that the above algorithm would need rework if there are updates in the array. Think about why?
This is my only grievance here. Cheers.

Engineering @Flipkart

Engineering @Flipkart