Pregunta de entrevista de National Instruments

Write a function to find the average value of a binary tree.