Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

queue in python

#1 Use normal list 
arr=[]
#for pushing in the end use arr.append() Method
# for popping from the first use arr.pop(0)

#2 Use deque
from collections import deque
#the initialize
queue=deque()
#for pushing use append Method
#for popping use queue.popleft()
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #queue #python
ADD COMMENT
Topic
Name
8+2 =