Stacks
Queue
  • Last in last out
  • Only front item accessible
  • Enqueue(add back), Dequeue(take front), (see)first,(is)empty,(is)full
  • Big O
  • En O(1) De(static head) O(n) De(Dynamic head) O(1)
  • Assessment

    Data Structure

    Abstract data type

    ADT vs DS

    Linear

    Hierarchical

    Graphs

    Set structure

    Choosing DS

    Stacks and Queues

    Data Structures:

    A programatic way of storing data so that it can be used efficently by the program

    Abastract Data Type:

    A Mathmatical model for a data types (Stack, Queue, Graph) (An Application that uses an ADT is not concerned how the data is stored, and the abstract data type is not concerned how the application uses it.)
    Stacks
    Like an array, but data that is sent to the array gets added to the end, and you can only acess the last element in the array (first in, last out) Works like a pile of dirty dishes, most recent gets cleaned first.
    Queue
    Like an array, but data that is sent to the array gets added to the end, and you can only acess the first element in the array (first in, first out) This works like a queue in normal life (eg, at a cafe)