int complete(const Node* t) { if(t == NULL) return 0; else { int x = complete(t->left); int y = complete(t->right); if(x >= 0 && x == y) return x + 1; else return -1; } }