Pregunta de entrevista de Cognizant

I was asked to write code for Binary Tree.