Analyste Interview Questions

434,457 analyste interview questions shared by candidates

You are given an array of integers, A1, A2, ..., An, including negatives and positives, and another integer S. Now we need to find three different integers in the array, whose sum is closest to the given integer S. If there exists more than one solution, any of them is ok. Is there an algorithm to find the three integers in O(n^2) time?
avatar

Quantitative Research Analyst

Interviewed at Citadel

4
Jun 13, 2011

You are given an array of integers, A1, A2, ..., An, including negatives and positives, and another integer S. Now we need to find three different integers in the array, whose sum is closest to the given integer S. If there exists more than one solution, any of them is ok. Is there an algorithm to find the three integers in O(n^2) time?

Viewing 1261 - 1270 interview questions

Glassdoor has 434,457 interview questions and reports from Analyste interviews. Prepare for your interview. Get hired. Love your job.