Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Letter Queue by Albert.Nowak
def letter_queue(comm):
res=[]
for cm in comm:
l=cm.split(" ")
if (l[0]=="PUSH"):
res.append(str(l[1]))
elif l[0]=="POP":
if len(res)>0:
res.pop(0)
s=""
return s.join(res)
Jan. 17, 2016