Files
Data-Structure/BinaryTree/priorityQueue/maxHBLT/binaryTreeNode.h
e2hang a2cbb2ad7d HBLT
2025-08-10 18:13:25 +08:00

23 lines
526 B
C++

//
// Created by PC on 25-8-6.
//
#ifndef BINARYTREENODE_H
#define BINARYTREENODE_H
template<class T>
class binaryTreeNode {
public:
T element;
binaryTreeNode<T>* left;
binaryTreeNode<T>* right;
public:
binaryTreeNode() {left = right = nullptr;}
explicit binaryTreeNode(const T& e) : element(e), left(nullptr), right(nullptr) {}
binaryTreeNode(const T& e, binaryTreeNode<T>* l, binaryTreeNode<T>* r) : element(e), left(l), right(r) {}
~binaryTreeNode() = default;
};
#endif //BINARYTREENODE_H