smallcase interview question

difference in tree and graph