Sum of Three Values

Given an array of integers and a value, determine if there are any three integers in the array whose sum equals the given value.

Statement

Given an array of integers and an integer value, determine if there are any three integers in the array whose sum equals the given value. Return true if three such integers from the array are found. Otherwise, return false.

Example

Consider this array and the target sums:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.