Rec Room Interview Question

Problem on data structures and recursion