Add example for doubly linked list

This commit is contained in:
Abdelrahman Said
2025-03-01 22:34:17 +00:00
parent 6f2cdd8d62
commit b7264e20f2
11 changed files with 374 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
if (!list || !node || !(node->string)) {{
return;
}}
{T}List node_list = {Tlower}_node_to_list(node);
if (list->node_count == 0) {{
*list = node_list;
return;
}}
list->total_size += node_list.total_size;
list->node_count += node_list.node_count;
{T}Node *first = list->first;
if (first) {{
first->prev = node_list.last;
}}
list->first = node_list.first;
node_list.last->next = first;