Files
Data-Structure/LinearList/BinaryTree/binaryTree.h
2025-08-06 16:22:28 +08:00

23 lines
560 B
C++

//
// Created by PC on 25-8-6.
//
#ifndef BINARYTREE_H
#define BINARYTREE_H
#include "binaryTreeNode.h"
template <class T>
class binaryTree {
public:
virtual ~binaryTree() = default;
virtual bool empty() const = 0;
virtual int size() const = 0;
virtual void preOrder(void(*) (binaryTreeNode<T>*) ) const = 0;
virtual void inOrder(void(*) (binaryTreeNode<T>*) ) const = 0;
virtual void postOrder(void(*) (binaryTreeNode<T>*) ) const = 0;
virtual void levelOrder(void(*) (binaryTreeNode<T>*) ) const = 0;
};
#endif //BINARYTREE_H