|
| 1 | +- Singly linked lists |
| 2 | + |
| 3 | +Tests ✔️ |
| 4 | +* Tests: This Directory is for tests purposes. |
| 5 | + |
| 6 | +Header File 📁 |
| 7 | +* lists.h: Header file containing definitions and prototypes for all types and functions written for the project. |
| 8 | +Type/File Definition/Prototype |
| 9 | +* struct list_s • char *str |
| 10 | +* unsigned int len |
| 11 | +* struct list_s *next |
| 12 | +typedef list_t struct list_s |
| 13 | +0-print_list.c size_t print_list(const list_t *h); |
| 14 | +1-list_len.c size_t list_len(const list_t *h); |
| 15 | +2-add_node.c list_t *add_node(list_t **head, const char *str); |
| 16 | +3-add_node_end.c list_t *add_node_end(list_t **head, const char *str); |
| 17 | +4-free_list.c void free_list(list_t *head) |
| 18 | + |
| 19 | +Tasks 📃 |
| 20 | +* 0. Print list |
| 21 | + * 0-print_list.c: C function that prints all the elements of a list_t list. |
| 22 | + * If str is NULL, the function prints [0] (nil). |
| 23 | +* 1. List length |
| 24 | + * 1-list_len.c: C function that returns the number of elements in a linked list_t list. |
| 25 | +* 2. Add node |
| 26 | + * 2-add_node.c: C function that adds a new node at the beginning a of a list_t list. |
| 27 | + * If the function fails - returns NULL. |
| 28 | + * Otherwise - returns the address of the new element. |
| 29 | +* 3. Add node at the end |
| 30 | + * 3-add_node_end.c: C function that adds a new node at the end of a linked list_t list. |
| 31 | + * If the function fails - returns NULL. |
| 32 | + * Otherwise - returns the address of the new element. |
| 33 | +* 4. Free list |
| 34 | + * 4-free_list.c: C function that frees a list_t list. |
| 35 | +* 5. The Hare and the Tortoise |
| 36 | + * 100-first.c: C function that prints You're beat! and yet, you must allow,\nI bore my house upon my back!\n before the main function is executed. |
| 37 | +* 6. Real programmers can write assembly code in any language |
| 38 | + * 101-hello_holberton.asm: 64-but assembly program that prints Hello, Holberton followed by a new line using only the printf function witout interrupts. |
| 39 | + |
0 commit comments