-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeBST.java
More file actions
24 lines (20 loc) · 749 Bytes
/
NodeBST.java
File metadata and controls
24 lines (20 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.mycompany.binarysearchtree;
/**
*
* @author HP
*/
public class NodeBST {
int data; // The data stored in the node
NodeBST leftChild; // Points to the left child node
NodeBST rightChild; // Points to the right child node
// Constructor to initialize the node with data
public NodeBST(int data) {
this.data = data;
this.leftChild = null; // Initially, the left child is null
this.rightChild = null; // Initially, the right child is null
}
}