#include<iostream> using namespace std; typedef struct node { int num; struct node* left, * right; node(int n) :num(n), left(NULL), right(NULL) {} }TreeNode, * Tree; void Insert(Tree &root, int num,int &ans) { if (root == NULL) { root = (Tree)malloc(sizeof(TreeN...