Pocket Gems interview question

Q: question about a tenery tree and code review question