Pergunta de entrevista da empresa National Instruments

find average of binary tree, write out exact code