Pregunta de entrevista de Pocket Gems

Data structure and Algorithm questions. A coding question about Tree.