Amazon interview question

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