โ† Adobe questions

Generate 1-7 from 1-5

Filed under Adobe

Given a function foo() that returns integers 1 to 5 with equal probability, write a function that returns integers 1 to 7 with equal probability, minimizing expected calls to foo().

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 Adobe questions

Collected from public candidate posts and coding forums. Updated Nov 2026.