We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Yes it is different. The full meaning of deque is Double-Ended Queues. Stacks/Queues, normally are optimized for constant time insertions/deletions on one end only.
According to Python's documentation:
Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Level Order Traversal
You are viewing a single comment's thread. Return to all comments →
Yes it is different. The full meaning of
deque
is Double-Ended Queues. Stacks/Queues, normally are optimized for constant time insertions/deletions on one end only. According to Python's documentation: