Files
Data-Structure/BinaryTree/indexBinarySearchTree/binaryTreeNode.h
2025-08-12 12:09:53 +08:00

20 lines
573 B
C++

//
// Created by PC on 25-8-11.
//
#ifndef BINARYTREENODE_H
#define BINARYTREENODE_H
#include <utility>
template<class K, class E>
class binaryTreeNode {
public:
std::pair<K, E> element;
binaryTreeNode<K, E>* left;
binaryTreeNode<K, E>* right;
binaryTreeNode() : left(nullptr), right(nullptr){}
explicit binaryTreeNode(const std::pair<K, E>& e) : element(e), left(nullptr), right(nullptr) {}
binaryTreeNode(const std::pair<K, E>& e, binaryTreeNode<K, E>* l, binaryTreeNode<K, E>* r) : element(e), left(l), right(r) {}
};
#endif //BINARYTREENODE_H