This commit is contained in:
Noah L. Schrick 2022-04-20 22:24:49 -05:00
parent 8f2043f5e6
commit 21a24ae723

View File

@ -66,6 +66,7 @@ The delete function takes two arguments. The first is a pointer to a node, and s
The cleanup function was implemented by following the pseudocode of the three cases discussed during lecture, and the function takes a sole argument, which is a pointer to the node currently being examined. The function makes use of a while loop that checks if the current node and its parent are both red. Each case respectively calls the left and right rotate as necessary.
\subsubsection{Display}
Due to the saturated nature of binary tree displays, a novel approach for a print was unlikely. This program implemented an approach for a terminal-based print based on an existing method, and references its origin in the code itself. It makes use of recursion and a custom struct called ``Trunks", that has a pointer member to the previous trunk, and a string member that corresponds to a specific string for a left or right child.
\section{Results}
\subsection{Part 1.B: ``Tree 1"}