Amazon Interview Question

build a treenode from scratch