Two Pointers Algorithm Python Template