Binary Tree class

  #include<iostream>


#include<vector>


#include<queue>


using namespace std;


template <typename T>



class binaryTree{

    public:

    T data;

    binaryTree * left;

    binaryTree * right;

    

    binaryTree(T data){

        this->data=data;

        left=NULL;

        right=NULL;

    }

    ~binaryTree(){

        delete left;

        delete right;

    }

};


int main(){

    

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings