Amazon Interview Question

Write the code to implement some data structure similar to binary tree.