Cognizant Interview Question

Basic Questions about tree and graph