Meta interview question

One tree question and one graph question.