Two pointer algorithm

My doubt is related to the two pointer algorithm where we have to print out the no. of pairs of elements in an array that have sum equal to K (where K is an integer).

To solve this, one part of the solution says that - If the sum is bigger than the target sum, this means that we need a smaller sum so, we are going to decrement the Pointer 2 (end-pointer).

My doubt is - when the sum is greater than K, it’s understandable that we have to decrement the Pointer 2(end-pointer) to get close to K but WHY CAN’T WE DECREASE POINTER-1? Decreasing Pointer-1 should also get close to K, isn’t it?

I have seen dozens of solution/explanation on two pointer algorithm and couldn’t find an answer as to why we don’t decrease Pointer-1. Need your help.

hi @rohalarchit_6919912cb9979c83,
you wanna make the traversan in o(N) time reaching same elements more than once will increase the complexity and maybe you will keep moving back and forth so the algorithm is such that time is o(N) where no element is visited more than once