RainScales interview question

How did you solve hard problem?