Tech Mahindra Interview Question

height of tree