Flashcards
Stacks & Queues

Flashcards do conjunto (10)
- 1What's an ADTAn ADT defines a data type by the values that data can have and operations on the data (eg Lists...)
- 2Define a stackadt w two operations: push and pop
- 3Data structures for a stack, how to use and whyarray lists: addLast and removeLast
singly linked lists: from the front
doubly l l : doesn't matter - 4Stack overflow vs underflowfull then try to push,
empty then try to pop - 5Whats the call stack.
- 6alg for parentheses

- 7define a queueFirst come first served policy.
Two basic operations: enqueue(e) and dequeue() - 8data structures for queuessingly l l : enqueue and dequeue with addlast and removefirst
doubly l l: works too
array list: enque is addlast and dequeue is removefirst but dequeue inefficient
circular array - 9tail formula for circular arraytail = (head+size-1)mod length
- 10alg for circular array

Informações
- Descrição
- Computer Science FlashCards sobre Stacks & Queues, criado por Virginie Gagné em 15-04-2022.
- Criado por
- Virginie Gagné
- Visualizações
- 0
- Avaliação