130k views
3 votes
Assuming deq is a deque object, the expression deq.push_front(elem) deletes the first element from deq.

True

False

1 Answer

1 vote

Answer: False

Step-by-step explanation:

This code code not deletes element from deq. This insert element at the beginning of deq. if it was deq.pop_front(elem) then it would have deleted the first element.

Therefore, it is false.

User Yves Amsellem
by
4.7k points