HCLTech interview question

Tree height calculation