Pregunta de entrevista de National Instruments

find average of binary tree, write out exact code