← Goldman Sachs questions
CodingReported in a candidate post, Mar 2025

String Compression

Filed under Goldman Sachs · Also reported at Adobe, Amazon, APIwiz, Bajaj Finserv Health, EPAM, FactSet, Happay, IBM and 2 more

Given an array of characters chars, compress it in place using these rules: for each group of consecutive repeating characters, append the character, and if the group length is greater than 1, also…

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.