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.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aman Garg

Aman Garg

More from Medium


Thoughts This Christmas

The Beginning of Pixi