Two Pointer Approach In Cpp