https://medium.com/@KeyurRamoliya/python-use-two-pointer-technique-for-efficient-array-and-string-manipulation-10b6b09f8293