Problem : Write a function that does a post-order traversal of a tree and returns the sum of the data in all the nodes it visits.

int sum_postorder(tree_t *tree) { if (tree!=NULL) return tree->data + sum_postorder(tree->left) + sum_postorder(tree->right); else return 0; }

Problem : Write a function to find the minimum height of the tree, meaning the path from the root to a NULL child that passes through the fewest nodes.

int tree_min_height(tree_t *tree) { int left, right; if (tree==NULL) { return 0; } else { left = tree_min_height(tree->left); right = tree_min_height(tree->right); return(1 + (left > right ? right : left)); } }

Problem : Write a function that finds the largest value in a tree containing an unsigned integer as the data.

unsigned int tree_max_val(tree_t *tree) { if (tree==NULL) return 0; else { unsigned int left = tree_max_val(tree->left); unsigned int right = tree_max_val(tree->right); unsigned int max = left > right ? left : right; max = tree->data > max ? tree->data : max; return max; } }

Problem : Imagine that you were to draw a tree on a piece of paper, cut it out, and then connect it together with wire and string like it was a mobile. In more technical terms, the tree's right and left child would be allowed to swap places, taking with them their children. Write a function to compare two mobile trees to determine their equality. The following are examples of mobile and non-mobile trees.