Skip to content

aj96/Binary_Search_Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Binary_Search_Tree

Synopsis

About binary search trees: https://en.wikipedia.org/wiki/Binary_search_tree

This is to show off a rust library I made which contains two structs Tree and TreeNode, which are used to create a binary search tree. You can find and insert treenodes, as well as conduct a post-order traversal, an in-order traversal, and a pre-order traversal and obtain the respective vectors containing all the keys.

The main.rs file shows how to test the library. All tests pass so far...

Motivation

To teach myself how to program in Rust.

Installation

Assuming you already have Rust installed...

Open an empty directory in your computer. Run the commands:

$ cargo new Binary_Search_Tree --bin

$ cd Binary_Search_Tree

Put the main.rs and lib.rs of this repository into the src folder of Binary_Search_Tree. Then run the command:

$ cargo run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages