← Goldman Sachs questions
CodingMediumReported in a candidate post, Dec 2021

Check for balanced parentheses and run-length encoding

Filed under Goldman Sachs

Solve two sub-problems: 1) Check if a given string of parentheses is balanced containing '(', ')', '{', '}', '[', ']'. 2) Perform run-length encoding on a string (e.g., 'aabcccccaaa' becomes…

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.