└── Binary search tree /Binary search tree: -------------------------------------------------------------------------------- 1 | public static Node insert(Node root,int data) { 2 | if(root==null) 3 | { 4 | root=new Node(data); 5 | return root; 6 | } 7 | if(dataroot.data) 12 | { 13 | root.right=insert(root.right,data); 14 | } 15 | return root; 16 | 17 | 18 | } 19 | --------------------------------------------------------------------------------