AlteredTree
This commit is contained in:
19
BinaryTree/indexBinarySearchTree/binaryTreeNode.h
Normal file
19
BinaryTree/indexBinarySearchTree/binaryTreeNode.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// 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
|
Reference in New Issue
Block a user