( 1 ) First to quickly sort the array ( 2 ) to find the pointer around void findSumEqualTarget ( int [] ARR, int target, int len) { int First = 0 ; int Last len = 1 ; int SUM = 0 ; the while (First < Last) { SUM = ARR [First] + ARR [Last]; IF (SUM == target) { the printf ( " % D, D% " , ARR [First], ARR [Last]); First ++; last--; } else if (sum < target) { first++; } else { last--; } } }