Opposite Directional Two Pointer Approach In Cpp