Two pointers point to the head and tail respectively. If the sum of the values pointed by the two pointers is greater than target, move the tail pointer left to decrease the sum; if the sum is less than target, move the head pointer right to increase the sum.