Toast Inc interview question

It involved using arrays and recursion