#include <cstdlib> #include <iostream> using namespace std; typedef struct _NODE { int value; struct _NODE *left; struct _NODE *right; _NODE(int value) : value(value), left(NULL), right(NULL) {}; }NODE, *PTRNODE; void insert(PTRNODE &root, int value) { if(root == NULL) root = new NODE(value); else { if(value < root->value) insert(root->left, value); else if(value > root->value) insert(root->right, value); else cout << "duplicated value" << endl; } } void preOrder(PTRNODE root) { if(root != NULL) { cout << root->value << "->"; preOrder(root->left); preOrder(root->right); } } void inOrder(PTRNODE root) { if(root != NULL) { inOrder(root->lef