Pergunta de entrevista da empresa Rec Room

Problem on data structures and recursion