← Goldman Sachs questions
CodingReported in a candidate post, Sep 2019

Merge adjacent elements based on conditions

Filed under Goldman Sachs

Given an array of integers, repeatedly merge adjacent elements based on a specific condition (e.g., matching parity or values) until no more adjacent elements meet the merge criteria. Return the…

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.