You’re right — many problems that use two-pointer technique that can solve tasks in O(n) time are actually limited by the O(n log n) time to sort. I neglected to mention that but have added it — thanks for pointing out.

ML & CS enthusiast. Let’s connect: https://www.linkedin.com/in/andre-ye. Check out my podcast: https://open.spotify.com/show/0wUzfk9C6nnH9G0tKXudUe

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