Skip to content

Repository files navigation

Binary Search Tree (C++)

A Binary Search Tree implementation developed as part of CSC 340: Programming Methodology at San Francisco State University.

This project demonstrates the implementation of a complete Binary Search Tree (BST) data structure in C++ with support for insertion, deletion, searching, traversal operations, and tree property analysis.

Academic Project

This project was completed as part of a university data structures course and focuses on implementing fundamental tree-based data structures from scratch.

Authors

  • Atiksha Fnu
  • Vihaan Shah

Features

  • Node insertion and deletion
  • Search operations
  • Tree height calculation
  • Node count tracking
  • In-order traversal
  • Pre-order traversal
  • Post-order traversal
  • Breadth-first traversal
  • Depth-first traversal
  • Tree clearing and memory management

Technologies

  • C++
  • Object-Oriented Programming
  • STL
  • JSON-based test configuration

Data Structures Used

  • Binary Search Trees
  • Tree Nodes
  • Queues (for breadth-first traversal)
  • Recursive algorithms

Build

g++ -std=c++11 -o milestone4 milestone4.cpp binary_search_tree.cpp tree_node.cpp

Run

./milestone4

Key Concepts Demonstrated

  • Tree traversal algorithms
  • Recursion
  • Dynamic memory management
  • Object-oriented design
  • Time complexity analysis
  • Data structure implementation

Performance

Operation Average Complexity
Insert O(log n)
Delete O(log n)
Search O(log n)
Traversal O(n)

Future Improvements

  • AVL Tree balancing
  • Red-Black Tree implementation
  • Generic template support
  • Iterator support

Course Information

Developed for CSC 340: Programming Methodology at San Francisco State University.

About

Binary Search Tree implementation in C++ with traversal, search, insertion, and deletion operations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages