how do dynamic ds work
ds = data structure
allocate and deallocate memory from the heap
heap an area of memory used specifically for this purpose
differences between dynamic and static data structures
advantages of dynamic data structures
disadvantages of dynamic data structures
what is a dictionary
a collection of key-value pairs in which the value is accessed via the associated key;
circular queue advantage
when to use a linear queue over a circular queue
when a queue is small in size
attribute of a circular queue
a pointer to the front;
what is a priority queue
system that aims to deal with tasks on FIFO basis, but after giving them a priority order
remove an item from a circular queue
method
adding an item to a linear queue
method
adding an item to a priority queue
method
what is a tree
connected, undirected graph; with no cycles;
what is a rooted tree
what is a binary tree
common application of a binary tree
binary search tree;
pre-order traversal
follow the left of the node - go round and underneath tree, whenever line touches left of node, visit
in-order traversal
follow the bottom of the node - go round and underneath tree, whenever line touches bottom of node, visit
post-order traversal
follow the right of the node - go round and underneath tree, whenever line touches right of node, visit
stack frame components
peeking a stack
what does it do
returns the value of the top element without removing it
implemening repeat and undo operations with one stack
method
reverse order of items in a queue with a single stack
method
what does a front pointer do
points to the next item to remove