User Tools

Site Tools


notes:data

This is an old revision of the document!


Data Structures Course Notes

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

week 1

week 2

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;

I dunno lol

“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

whaaat

–i increments before loop, i– increments after first iteration

notes/data.1510092969.txt.gz · Last modified: 2017/11/07 17:16 by abratkov