← FactSet questions

Find two or four elements in array with sum equal to k

Filed under FactSet

Given an array of integers and a target sum k, find two elements that sum to k. Then, extend the solution to find four elements that sum to k.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related FactSet questions

Collected from public candidate posts and coding forums. Updated Nov 2026.