- #1
GeorgeCostanz
- 31
- 0
I have a minor question about this diagram I'm hoping someone can clear up for me.
The deque has initial capacity 4. The following operations are performed.
push_back(1)
push_back(2)
push_back(3)
pop_front()
pop_front()
push_back(4)
push_front(5)
push_front(6)
push_front(7)
final answer:
I'm just wondering what the space above the letter 'E' is supposed to signify. I thought there were only 2 empty slots in the deque for the 2 pop_front operations at initial capacity 4.
The deque has initial capacity 4. The following operations are performed.
push_back(1)
push_back(2)
push_back(3)
pop_front()
pop_front()
push_back(4)
push_front(5)
push_front(6)
push_front(7)
final answer:
I'm just wondering what the space above the letter 'E' is supposed to signify. I thought there were only 2 empty slots in the deque for the 2 pop_front operations at initial capacity 4.