#include <iostream>
using namespace std;
struct Node {
int data;
Node* left;
Node* right;
};
void inorder(Node* root) { // major mistake (Node* root) is correct)
if(root == NULL) {
return; }
inorder(root->left);
cout << root->data << endl;
inorder(root->right);
}
No comments:
Post a Comment