Represent null with INT_MAX in C, C++.

This commit is contained in:
krahets
2023-04-18 14:31:23 +08:00
parent ed8fa6aea3
commit 6723cdbc7e
11 changed files with 35 additions and 26 deletions

View File

@ -17,7 +17,7 @@ void testListNode() {
}
void testTreeNode() {
int nums[] = {1, 2, 3, NIL, 5, 6, NIL};
int nums[] = {1, 2, 3, INT_MAX, 5, 6, INT_MAX};
int size = sizeof(nums) / sizeof(int);
TreeNode *root = arrToTree(nums, size);