Question: Task 1 We define the following class Node class Node{ int data; Node left; Node right; public Node(int data){ this.data=data; left = null; right =

 Task 1 We define the following class Node class Node{ int

Task 1 We define the following class Node

class Node{

int data;

Node left;

Node right;

public Node(int data){

this.data=data;

left = null;

right = null;

}

public String toString(){

return data+" ";

}

}

Task 2 Define the class BST

public class Bst {

Node root;

public Bst() {

root = null;

}

}

Task 1 We define the following class Node class Node \{ int data; Node left; Node right; public Node(int data) this.data = data; left = null; right = null; \} public String toString ()\{ return data+" "; \} Task 2 Define the class BST public class Bst \{ Node root; public Bst ()\{ root = null; \}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!