java - Unable to get left/right in TreeNode class -
i working on problem regarding binary search tree using java. name of built-in class in treenode. in solution, shows
however, when did implementation myself, not able "root.left" or "root.right". wondering if missed anything? thanks!
accessing right/left in way imply treenode implemented in way:
public class treenode<t> { public treenode<t> right; public treenode<t> left; public t value; }
Comments
Post a Comment