Pergunta de entrevista da empresa Cognizant

I was asked to write code for Binary Tree.