Kap 8 - Abstrakta datatyper

    Cards (50)

    • What are the basic data structures mentioned?
      Arrays, aggregates, lists, trees
    • What are the types of lists mentioned?
      • Stacks
      • Queues
      • Ordinary Queues
      • Priority Queues
    • What is an array?
      A block of data with same type entries
    • What does a two-dimensional array consist of?
      Rows and columns
    • What are indices used for in arrays?
      To identify positions
    • What is an aggregate?
      A block of data items of different types
    • What is each data item in an aggregate called?
      A field
    • How are fields accessed in aggregates?
      By name
    • What defines a list?
      A collection of data arranged sequentially
    • What is the head of a list?
      The beginning of the list
    • What is the tail of a list?
      The end of the list
    • What does LIFO stand for?
      Last-in-first-out
    • What is a stack?
      A list where entries are removed at the head
    • What is the top of a stack?
      The head of the list
    • What is the bottom or base of a stack?
      The tail of the list
    • What does "pop" mean in stack terminology?
      To remove the entry at the top
    • What does "push" mean in stack terminology?
      To insert an entry at the top
    • What is a queue?
      A list where entries are removed at the head
    • What does FIFO stand for?
      First-in-first-out
    • What does "enqueue" mean?
      Add element to queue
    • What does "dequeue" mean?
      Remove element from queue
    • What is a priority queue?
      A queue where data is moved by priority
    • What is a tree?
      A collection of data with hierarchical organization
    • What is a node in a tree?
      An entry in a tree
    • What is the root node?
      The node at the top
    • What is a terminal or leaf node?
      A node at the bottom
    • What is a parent node?
      The node above a specified node
    • What is a child node?
      A node below a specified node
    • What is an ancestor in tree terminology?
      Parent, parent of parent, etc.
    • What is a descendent in tree terminology?
      Child, child of child, etc.
    • What are siblings in tree terminology?
      Nodes sharing a common parent
    • What is a binary tree?
      A tree with at most two children per node
    • What does depth refer to in a tree?
      Longest path from root to leaf
    • What are the features of a class?
      • Abstract data type
      • Properties can be inherited
      • Constructor methods to initialize objects
      • Contents can be encapsulated
    • What is an object?
      An instance of a class
    • What is the purpose of the push method in the StackOfIntegers class?
      To insert an entry at the top
    • What does the pop method do in the StackOfIntegers class?
      Removes the entry at the top
    • What does the isEmpty method check in the StackOfIntegers class?
      Whether the stack is empty
    • What does the isFull method check in the StackOfIntegers class?
      Whether the stack is full
    • What is the maximum size of the stack in the StackOfIntegers class?
      20
    See similar decks