Microsoft interview question

Questions were from trees, graphs