Name: Anonymous 2014-01-20 18:58
what is you're opinion on foreache loops?
i don't like em cuz they ache in the fore
i don't like em cuz they ache in the fore
struct linked_list {
struct linked_list *list_this_is_a_subset_of;
struct linked_list **lists_that_are_sublists_of_this_list;
size_t length;
struct linked_list_node *head;
}
NULL
next and that the list to be appended isn't a sublist of anything else, concatenates the two together, walks up to the parent of all lists, then walks down all sublists, fixing the lengths as appropriate. nth_tail likewise adds an entry to lists_that_are_sublists_of_this_list (for which a few ancillary variables are omitted to keep the struct cleaner, fill them in depending on how memory-aggressive you want to be) so that it doesn't get left un-updated when its sibling has a list appended to it.