Crate theOne

source ·
Expand description

Learning Rust: Project for CS471 at SUNY Binghamton

Detailed Introduction

This is a detailed intro to this libraray

  • This Crate builds a fully operational binary search tree
  • When run normally, users will be able to interract with the terminal to create and modify the tree
  • Users will be able to use functions such as:
  • adding nodes to a tree
  • deleting nodes
  • finding a node in the tree
  • displaying the tree Example:
let mut tree = BinTree{..Default::default()};
tree.add_node(Node{val:14});
tree.add_node(Node{val:15});
tree.add_node(Node{val:13});
tree.print(0);
tree.delete(14);
tree.print(0);

🦀⚠️

Modules

  • Module that houses all Binary Tree Operations
  • Simple module defining the Node structure and its implementations
  • Module that holds statistics for the BST #[derive(Debug,Clone)]

Constants

  • COUNT 🔒
    This is a constant variable for spacing when printing the Tree.

Statics

Functions