Pergunta de entrevista da empresa JAI

Array based ,tree question like preorder from in order