This project focuses on more advanced usage of singly linked lists in C. It covers how to manipulate singly linked lists, how to handle edge cases, and how to apply these concepts to solve problems effectively. The project aims to deepen your understanding of these fundamental concepts in C programming.
- How to use linked lists.
- How to handle edge cases in linked lists.
- How to manipulate linked lists effectively.
Task Name | File | Description |
---|---|---|
Print list | 0-print_listint.c | Writes a function that prints all the elements of a listint_t list. |
List length | 1-listint_len.c | Writes a function that returns the number of elements in a linked listint_t list. |
Add node | 2-add_nodeint.c | Writes a function that adds a new node at the beginning of a listint_t list. |
Add node at the end | 3-add_nodeint_end.c | Writes a function that adds a new node at the end of a listint_t list. |
Free list | 4-free_listint.c | Writes a function that frees a listint_t list. |
Free list (safe version) | 5-free_listint2.c | Writes a function that frees a listint_t list and sets the head to NULL . |
Pop | 6-pop_listint.c | Writes a function that deletes the head node of a listint_t linked list, and returns the head node’s data (n). |
Get node at index | 7-get_nodeint.c | Writes a function that returns the nth node of a listint_t linked list. |
Sum list | 8-sum_listint.c | Writes a function that returns the sum of all the data (n) of a listint_t linked list. |
Insert | 9-insert_nodeint.c | Writes a function that inserts a new node at a given position. |
Delete | 10-delete_nodeint.c | Writes a function that deletes the node at index index of a listint_t linked list. |
Reverse list | 100-reverse_listint.c | Writes a function that reverses a listint_t linked list. |
Print (safe version) | 101-print_listint_safe.c | Writes a function that prints a listint_t linked list safely. |
Free list (safe version) | 102-free_listint_safe.c | Writes a function that frees a listint_t list safely. |
Find the loop | 103-find_loop.c | Writes a function that finds the loop in a linked list. |