No, there is no built-in device. Usually you should write your own built-in function, for example
static inline int max(int a, int b)
{
return (a > b) ? a : b;
}
( "" , ). , , - :
int height(struct node *tree)
{
int height_left, height_right;
if (tree == NULL) return 0;
height_left = height (tree->left);
heigth_right = height (tree->right);
return 1 + ((height_left > height_right) ? height_left : height_right);
}
N.B. . . -
, , , . MAX(++i, ++j). , , , . max, () , . , C ++ /, / max.