Visa Inc. Interview Question

implement small programming that the print from the edge of tree's value to root value.