Skip to content

About

A simple Java implementation of a Binary Search Tree (BST) with basic operations.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Binary Search Tree in Java

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.

📌 Features

  • 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

📁 Project Structure

bst/ ├── Node.java // Node structure for the BST ├── BST.java // BST operations └── MainBST.java // Driver class with example usage

🛠️ How to Run

  1. Clone the repository:
    git clone https://github.com/your-username/BinarySearchTree-Java.git
  2. cd BinarySearchTree-Java
  3. javac bst/*.java
  4. 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!

About

A simple Java implementation of a Binary Search Tree (BST) with basic operations.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages