Pregunta de entrevista de Allocadia Software

How would you write a function that sums the values in a binary tree?