You are viewing a single comment's thread. Return to all comments →
que=[] for i in range(int(input())): x=input() if x[0]=='1': val=int(x[2:]) que.append(val) elif x[0]=='2': que.pop(0) elif x[0]=='3': print(que[0])
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 →