Module 1: Introduciton to DAA Flashcards
_____ is a sequence of n items of the same data type that are stored contiguously in computer memory and made accessible by specifying a value of the array’s index.
Arrays
_____ is a sequence of zero or more nodes each containing two kinds of information: some data and one or more links called pointers to other nodes of the linked list.
Linked List
Array or Linked List?
- fixed length
- contiguous memory locations
- direct access
- insert/delete
Array
Array or Linked List?
- dynamic length
- arbitrary memory locations
- access by following links
- insert/delete
Linked List
Stacks or Queues?
Insertion/deletion can be done only at the top.
Stacks
Stacks or Queues?
LIFO/ FILO
Stacks
Stacks or Queues?
Two operations (push and pop).
Stacks
Stacks or Queues?
Stack of plates.
Stack
Stacks or Queues?
A queue of costumers waiting for services.
Queues
Stacks or Queues?
Insertion/ enqueue from the rear and deletion/ dequeue from the front.
Queue
Stacks or Queues?
FIFO/ LILO
Queue
Stacks or Queues?
FIFO/ LILO
Queue
_____ is a data structure for maintaining a set of elements, each associated with a key/priority, with the following operations: FInd elements with highest priority. deleting element with highest priority, inserting a new element.
Priority Queues(implemented using Heap Sort)
_____ it is a connected acyclic graph.
Trees