Pergunta de entrevista da empresa National Instruments

get the average value of a binary tree