StacksAndQueues Flashcards

1
Q

Define

Efficiency of Stacks

push and pop

A

Push: O(1)
pop: O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define

Efficiency of a Queue

A

Insert and remove O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define

Efficiency of Priority Queue

Insertion and deletion

A

Insertion: O(N)
Deletion O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define

Application

in data structures

A

Parsing Arithmetic Expressions. First transform into postfix notation, then evaluate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly