--- title: "dynamic-linear-datatype" tags: - cosc201 - datastructure --- Both are Dynamic linear data types (interface) An abstraction of a collection of data organised "in a line" which supprts addition of new elements and the removal of (some) old elements - representation - array (preffered because of memory management) - linked list (seems more natural) - and others # Stack LIFO Last in first out Can be used using javas `ArrayDeque` `push` and `pop` methods # Queue FIFO First in first out Can be used using javas `ArrayDeque` `add` and `remove` methods e.g., [priority-queue](notes/priority-queue.md)