Amazon interview question

Write a Program for binary tree