refactor: make day 5 part 2 code fast

This commit is contained in:
2023-12-08 19:46:04 +01:00
parent cd316d54f9
commit 68c473e78f
3 changed files with 95 additions and 21 deletions

4
list.h
View File

@@ -52,6 +52,10 @@ static __inline void LIST_FN(remove)(LIST_NAME *alist, int index) {
#endif //LIST_UNORDERED
}
static __inline void LIST_FN(clear)(LIST_NAME *alist) {
alist->length = 0;
}
static __inline void LIST_FN(free)(LIST_NAME *alist) {
free(alist->data);
free(alist);