Here is a interview question: use uniformly distribution $\{1,2,3,4,5\}$ to generate $\{1,2,3,4,5,6,7\}.$
My solution is using quinary (5) number with 2 digitals, i.e. we can generate uniformly distribution $00$ to $44$ = $\{0, 1, 2,\cdots, 24\},$ then discard last 4 numbers and use $\{0, 1, 2, \cdots, 20\}$ to generate $\{1,2,3,4,5,6,7\}$ by mod 7.
Is there any standard way to solve such problem?