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 enthusiast. Get my book: https://bit.ly/modern-dl-book. Join Medium through my referral link: https://andre-ye.medium.com/membership.
Love podcasts or audiobooks? Learn on the go with our new app.