← Goldman Sachs questions
CodingReported in a candidate post, Nov 2020

Maximize sum of middle elements of triplets in an array of size 3n

Filed under Goldman Sachs

Given an array of size 3n, partition it into n triplets (a, b, c) such that a <= b <= c. Maximize the sum of the middle elements (b) across all n triplets.

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 Goldman Sachs questions

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