Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

DataStructuresProject

A project I made last year for the Data Structures subject.
We had to implement a Search Tree. The nodes had to have a key field and pointers to the parent and children nodes, along with constructors. The following methods had to be implemented:
INSERT(int key) - insert a new node with the value of key without creating duplicates
MAXIM(node* x)/MINIM(node* x)- return the node with the maximum/minimum value from the subtree with the root x
SUCCESOR(node* x)/PREDECESOR(node* x)- returns the node that is the successor/predecessor of a given node
FIND(int key) - returns a node based on its value
DELETE(int key) - deletes a node based on its value
ERASE(node* x) - deletes the given node from the tree
PRINT_TREE(int option) - based on the option number, prints the tree based on the chosen order
CONSTRUCT()- builds a tree from a vector of keys
EMPTY() - verifies if the tree is empty of not
CLEAR() - deletes all nodes from tree

About

C++ implementation of a Search Tree.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages