Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Binary-Search-Tree/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
31 lines (25 sloc)
859 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Binary-Search-Tree | |
210CT Coursework Submission for Questions 1 and 2 | |
Below are the functions and classes listed under their relevant question number | |
Most work is split into files meaning Question 1 is answered mostly using BST.py and Question 2 is mostly answered using BST_Delete.py, however both use at least some code from the other file so it is not a clear split between the questions. | |
Question 1: | |
Classes: | |
- BSTNode | |
- __init__(value, parent) | |
- checkChildren() | |
Functions: | |
- insertNode(tree, item, parent = None) | |
- treeFromFile(fileName) | |
- binaryTreeSearch(target, tree) | |
- searchNoPrint(target, tree) | |
- preOrder(tree) | |
Question 2: | |
Classes: | |
- BSTNode | |
- __init__(value, parent) | |
- checkChildren() | |
Functions: | |
- searchNoPrint(target, tree) | |
- delete(target, tree) | |
- deleteNode(node) | |
- deleteRoot(root) |