Skip to content

EliavShbt/BinarySearchTree-ADT

Repository files navigation

BinarySearchTree-ADT

Table of contents

General info

ADT & Binary search tree Project dealing with ADT, Binary search tree and working with files. The project is all written in 'C' language and uses files only, meaning there is no interaction with the user directly, it reads the Instructions from the 'Instructions.txt' file and 'output.txt.' is the output file which the program will write to.

Setup

To run this project, run 'main.c' file.

  • 'Instructions.txt' file - each command is excuted by 1-5 key numbers, the command will be separated with space, each key will be follwing with appropriate text for the operation
'1 '  = Append node to the tree (if the key isn't already exist in the tree, in that case error message will be printed in the file)
'2' = Printing inorder/preorder traversal - 'i' for inorder, 'p' for preorder
'3' = Calculating and printing to 'output.txt' file the height of the tree
'4' = Finding the element with the minimal key inside the tree
'5 x' = Printing 'x' minimal keys in ascending order (if 'x' number is bigger than the number of elements/nodes in the tree, suitable message will be printed)

About

'C' language project - ADT & Binary search tree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages