Write a C++ program to perform inorder traversal of the given tree.

struct Node* root = newNode(6); #include<iostream> using namespace std;struct node {int data;struct node *left;struct node *right;};struct node *createNode(int val) {struct node *temp = (struct node *)malloc(sizeof(struct node));temp->data = val;temp->left = temp->right = NULL;return temp;}void inorder(struct node *root) {if (root != NULL) {inorder(root->left);cout<data<<” “; inorder(root->right);}}struct node* insertNode(struct node* node, int val) {if (node == NULL) return …

Write a C++ program to perform inorder traversal of the given tree. Read More »