Google Interview Question

Basic data structure and recursion question