You are viewing a single comment's thread. Return to all comments →
perl:
while(<>){($c,$v)=split;$c==1?push@q,$v:$c==2?shift@q:$c==3&&print"$q[0]\n"}
Seems like cookies are disabled on this browser, please enable them to open this website
Queue using Two Stacks
You are viewing a single comment's thread. Return to all comments →
perl: