(81). 27.1. BINARY TREES INTRODUCTION. - anishsingh90/Data_Structure_And_Algorithm_In_Cpp_github.io GitHub Wiki
//BINARY TREE STRUCTURE CODE #include <bits/stdc++.h> using namespace std;
struct Node{ int data; struct Node* left; struct Node* right;
Node(int val){
data = val;
left = NULL;
right = NULL;
}
};
int main(){ struct Node* root = new Node(1); //root root->left = new Node(2); //left node of root root->right = new Node(3); //right node of root
root->left->left = new Node(4); //left node of left root
root->left->right = new Node(5); //right node of left root
root->right->left = new Node(6); //left node of right root
root->right->right = new Node(7); // right node of right root
/*
BINARY TREE
1 //ROOT
/ \
2 3
/ \ / \
4 5 6 7
*/
return 0;
}