The two classic interview data structures, from my C practice files: a singly linked list of names (2005) and a binary search tree of numbers (2011). Every function is animated step by step, with the pointers it uses. C leaves memory to the programmer, and that is where my bugs were: the programs print the right thing, but forget to free some memory, free the wrong thing, or crash on an empty list. Switch between my code and the fixed version to see the difference.
deleteTail freed temp->next->next, which is always NULL there, instead of temp->next: the last element was never freed.deleteElement never set prev before the loop, so deleting the first element tested garbage; and with a name not in the list it ended without returning anything.deleteAll freed every element but the first, and read each one after freeing it.addToEnd, deleteHead, deleteTail and reverseListRecursively crashed on an empty list.main's variables one…four still point to them.insertValue created the new node first thing, at every level of the tree it passed, but used only the one made at the bottom: inserting 2 in the test leaked three nodes.printTree, if(tree->left != NULL);, made the check do nothing, which happened to be harmless.