Meta interview question

Simple combinatorial generation