21 lines
431 B
C
21 lines
431 B
C
#include "General.h"
|
|
|
|
BOOLEAN Ex2BinaryTree(BinaryTree * root)
|
|
{
|
|
if (!root)
|
|
{
|
|
return (TRUE);
|
|
}
|
|
else
|
|
{
|
|
return (Ex2BinaryTree(root->left) &&
|
|
Ex2BinaryTree(root->right) &&
|
|
(root->right != NULL) ? root->info.int_ >= root->right->info.int_ : TRUE &&
|
|
(root->left != NULL) ? root->info.int_ >= root->left->info.int_ : TRUE);
|
|
}
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
|
|
} |