Unify the naming of the C codes.

This commit is contained in:
Yudong Jin
2023-01-12 00:31:11 +08:00
parent 9ef3395aee
commit 40b5be5302
11 changed files with 51 additions and 52 deletions

View File

@ -9,24 +9,24 @@
void testListNode() {
int nums[] = {2, 3, 5, 6, 7};
int size = sizeof(nums) / sizeof(int);
ListNode *head = ArrayToLinkedList(nums, size);
PrintLinkedList(head);
ListNode *head = arrToLinkedList(nums, size);
printLinkedList(head);
ListNode *node = GetListNode(head, 5);
ListNode *node = getListNode(head, 5);
printf("find node: %d\n", node->val);
}
void testTreeNode() {
int nums[] = {1, 2, 3, NIL, 5, 6, NIL};
int size = sizeof(nums) / sizeof(int);
TreeNode *root = ArrayToTree(nums, size);
TreeNode *root = arrToTree(nums, size);
// print tree
PrintTree(root);
printTree(root);
// tree to arr
int *arr = TreeToArray(root);
PrintArray(arr, size);
int *arr = treeToArr(root);
printArray(arr, size);
}
int main(int argc, char *argv[]) {