Back to marketplace

2.3.2 Algorithms for Main Data Structures

No description yet. This curated deck is ready for daily study.

Total cards: 12•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (12)

#1
Front (Question)

Are stacks FIFO or FILO?

Back (Answer)

FILO

#2
Front (Question)

Which function adds an item to a stack?

Back (Answer)

Push

#3
Front (Question)

Which functions removes an element from a stack?

Back (Answer)

Pop

#4
Front (Question)

Which function adds an element to a queue?

Back (Answer)

Enqueue

#5
Front (Question)

Which function removes an element from a queue?

Back (Answer)

Dequeue

#6
Front (Question)

What is the purpose of a back pointer in a queue?

Back (Answer)

Holds the location of the next available space

#7
Front (Question)

Which function returns an item at the front of the queue without removing it?

Back (Answer)

Peek

#8
Front (Question)

What is the purpose of the front pointer in a queue?

Back (Answer)

Points to space containing the first item

#9
Front (Question)

What value is the top pointer initiliased to in a stack?

Back (Answer)

-1

#10
Front (Question)

Give pseudocode for the function adding new elements to a stack.

Back (Answer)

push(element) top = top + 1 A[top] = element

#11
Front (Question)

Give pseudocode for the function adding new elements to a queue.

Back (Answer)

enqueue(element): A[back] = element back = back + 1

#12
Front (Question)

Which function returns the item at the top of a stack without removing it?

Back (Answer)

Peek