minor fixes for indented bst print

This commit is contained in:
Iurii Tatishchev 2024-06-20 12:21:24 -07:00
parent def78cb76f
commit 466c09b944
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public:
void postOrder(void visit(const T&)) const { _postorder(visit, root); }
void printTree(void visit(const T&, int)) const { _printTree(visit, rootPtr, 1); }
void printTree(void visit(const T&, int)) const { _printTree(visit, root, 1); }
// abstract functions to be implemented by derived class
virtual void insert(const T& newData) = 0;
@ -99,7 +99,7 @@ template<class T>
void BinaryTree<T>::_printTree(void visit(const T&, int), BinaryTreeNode<T>* nodePtr, int level) const
{
if (nodePtr) {
ItemType item = nodePtr->getItem();
T item = nodePtr->getItem();
visit(item, level);
_printTree(visit, nodePtr->getRightPtr(), level + 1);
_printTree(visit, nodePtr->getLeftPtr(), level + 1);

2
CPU.h
View File

@ -74,7 +74,7 @@ public:
void display(const CPU &cpu);
void iDisplay(const string &cpuId, int level);
void iDisplay(const std::string &cpuId, int level);
void rowDisplay(const CPU &cpu, const std::vector<int> &widths);