https://medium.com/architectalgos/mastering-the-two-pointer-technique-a-guide-to-solving-array-problems-efficiently-71bd5a22bedc