← Goldman Sachs questions

Convert rand2() to rand3() and rand4()

Filed under Goldman Sachs

Given a function rand2() that returns 0 or 1 with equal probability (0.5), implement rand3() and rand4() using only rand2().

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.