Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** my_list_size | ||
4 | ** File description: | ||
5 | ** Returns the size of a linked list | ||
6 | */ | ||
7 | |||
8 | #include "mylist.h" | ||
9 | |||
10 | ✗ | int my_list_size(linked_list_t const *begin) | |
11 | { | ||
12 | ✗ | int nb = 0; | |
13 | |||
14 | ✗ | for (; begin != NULL; nb++) | |
15 | ✗ | begin = begin->next; | |
16 | ✗ | return nb; | |
17 | } | ||
18 |