Problem

Given an array of integers A[N] and an integer number targetSum

Find if existing in A three integers A[i], A[j] and A[k] such that A[i] + A[j] + A[k] = targetSum

Example

Input A[8] = {4, -9, 0, 11, 6, -20, 1, 7}, targetSum = 10

Expected output true

Two pointers approach