Loylogic interview question

Write a code to implement binary tree.