Update arrayToTree() and treeToArray() for C.

This commit is contained in:
krahets
2023-10-27 01:04:17 +08:00
parent 5b1a219b8b
commit 0e10274bb4
4 changed files with 57 additions and 78 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ ListNode *newListNode(int val) {
return node;
}
/* Generate a linked list with a vector */
/* Generate a linked list with an array */
ListNode *arrToLinkedList(const int *arr, size_t size) {
if (size <= 0) {
return NULL;