You are viewing a single comment's thread. Return to all comments →
static Node Insert(Node root,int value) {
if(root==null) { Node node=new Node(); node.data=value; node.left=null; node.right=null; root=node; } else if(root.data>value) root.left=Insert(root.left,value); else if(root.data<value) root.right=Insert(root.right,value); return root; }
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Search Tree : Insertion
You are viewing a single comment's thread. Return to all comments →
static Node Insert(Node root,int value) {