Topaz Labs interview question

Data structure with increasing difficulty