diff --git a/data_structures/queue/double_ended_queue.py b/data_structures/queue/double_ended_queue.py index a2fc8f66e..a3cfa7230 100644 --- a/data_structures/queue/double_ended_queue.py +++ b/data_structures/queue/double_ended_queue.py @@ -37,3 +37,21 @@ de.reverse() # printing modified deque print("The deque after reversing deque is : ") print(de) + +# get right-end value and eliminate +startValue = de.pop() + +print("The deque after popping value at end is : ") +print(de) + +# get left-end value and eliminate +endValue = de.popleft() + +print("The deque after popping value at start is : ") +print(de) + +# eliminate element searched by value +de.remove(5) + +print("The deque after eliminating element searched by value : ") +print(de)