Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Third solution in Clear category for Letter Queue by khanukov
def letter_queue(commands):
ans=""
for c in commands:
if (c[:4]=="PUSH"): ans=ans+c[5:]
else: ans=ans[1:]
return ans
April 17, 2015
Comments: