Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution solution in Clear category for Letter Queue by ludek.reif
def letter_queue(commands):
result = []
for i in commands:
if i.startswith('PUSH'):
result.append(i.split()[1])
elif i == 'POP' and result != []:
result.pop(0)
return "".join(result)
Feb. 2, 2016