This is an old revision of the document!
week 11
11/7/2017 Stacks - Last in, First out - pez dispenser Queues - First in, First out - lines, waiting for something, usually first person gets first pick -Andrei
Nodes are structures that contain data and also can point and “link” to another node, creating a list.
Nodes do not necessarily need to be a named variable, but rather can be pointed to by variables that can be moved depending if the list has been changed.(ie. start&tmp)
Ternary statements= “(condition) ? statementiftrue : statementiffalse;”
To free memory: use free() then set to null; ex: free(tmp); tmp = NULL;
“List” in sll0 is just an “engine” and “caboose”, which are pointers (like tmp) to “start” and “end”, therefore “mklist()” is super easy to use
–i increments before loop, i– increments after first iteration