This project is a simple and clean implementation of a Binary Search Tree (BST) in Java. It includes basic operations such as insertion, deletion, searching, and tree traversals.
- Insert nodes into the BST
- Delete nodes from the BST
- Search for a value
- Find minimum and maximum values
- Inorder traversal
- Preorder traversal
- Postorder traversal
bst/ ├── Node.java // Node structure for the BST ├── BST.java // BST operations └── MainBST.java // Driver class with example usage
- Clone the repository:
git clone https://github.com/your-username/BinarySearchTree-Java.git
- cd BinarySearchTree-Java
- javac bst/*.java
- java bst.MainBST
##📌 Sample Output Inorder: 20 30 40 50 60 70 80 Preorder: 50 30 20 40 70 60 80 Postorder: 20 40 30 60 80 70 50 Min: 20 Max: 80 Inorder after delete: 20 30 40 60 70 80
📚 Concepts Used Recursion Binary Search Tree (BST) logic Tree traversal algorithms Object-Oriented Programming (OOP) in Java
✅ Author This project was created by Ata Sakik to practice data structures in Java. Feel free to fork this repo, suggest improvements, or use it for learning purposes!