StacksAndQueues Flashcards
1
Q
Define
Efficiency of Stacks
push and pop
A
Push: O(1)
pop: O(1)
2
Q
Define
Efficiency of a Queue
A
Insert and remove O(1)
3
Q
Define
Efficiency of Priority Queue
Insertion and deletion
A
Insertion: O(N)
Deletion O(1)
4
Q
Define
Application
in data structures
A
Parsing Arithmetic Expressions. First transform into postfix notation, then evaluate.