made work: removeAtIndex(x);

This commit is contained in:
Odweta
2023-12-25 01:34:00 +01:00
parent c5ffbb9e89
commit b00858c9be
5 changed files with 86 additions and 3 deletions
+9
View File
@@ -214,3 +214,12 @@ listInsertAt(list_t* l, int index, dataType_e type, void* element) {
}
}
}
void
listRemoveAt(list_t* l, int index) {
vectorRemoveAt(l->data, index);
l->size -= 1;
if (l->size == l->capacity) {
l->capacity /= 2;
}
}