← Goldman Sachs questions

Generate and take union of binary numbers by flipping bits

Filed under Goldman Sachs

Given an array of integers and an integer k, convert each integer to k-bit binary. Generate all possible numbers by flipping one or more '1' bits to '0' and return the unique set of resulting…

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.