Pregunta de entrevista de Walmart Global Tech

Array, tree based questions and recursion.