A node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Compare its value to the last element of the vector (max so far). If it is greater than ...