Question d’entretien chez National Instruments

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