Skip to content

gaurimd28/Binary-Search-Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Binary Search Tree (BST) Implementation in Python

This project is a menu-driven Binary Search Tree (BST) implementation in Python.
It includes essential operations such as insertion, deletion, search, traversals, and additional features like copying, mirroring, depth calculation, and level-order traversal.


๐Ÿ“‚ Project Overview

The goal of this project is to demonstrate how a Binary Search Tree works internally โ€” including how nodes are inserted, deleted, and traversed using different algorithms.

The implementation uses Object-Oriented Programming (OOP) in Python for modularity and clarity.


โš™๏ธ Features

Feature Description
Insert Adds a new node to the BST. Duplicate keys are ignored.
Delete Removes a node (handles all three deletion cases).
Search Finds a specific value in the BST.
Inorder Traversal Displays nodes in sorted order.
Depth Calculation Computes the maximum depth (height) of the BST.
Mirror Image Converts the tree into its mirror image.
Copy Tree Creates a deep copy of the current BST.
Display Parent Nodes Displays parent nodes along with their child nodes.
Display Leaf Nodes Shows all the leaf (end) nodes of the tree.
Level Order Traversal Breadth-First Traversal displaying nodes level-wise.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages