Cognizant interview question

Some questions about graphs and trees