We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4617aa7 commit 189b350Copy full SHA for 189b350
data_structures/queue/double_ended_queue.py
@@ -37,3 +37,21 @@
37
# printing modified deque
38
print("The deque after reversing deque is : ")
39
print(de)
40
+
41
+# get right-end value and eliminate
42
+startValue = de.pop()
43
44
+print("The deque after popping value at end is : ")
45
+print(de)
46
47
+# get left-end value and eliminate
48
+endValue = de.popleft()
49
50
+print("The deque after popping value at start is : ")
51
52
53
+# eliminate element searched by value
54
+de.remove(5)
55
56
+print("The deque after eliminating element searched by value : ")
57
0 commit comments