You are viewing a single comment's thread. Return to all comments →
YES I CHEATED but it was fun to see it passing all test cases
arr = [] for i in range(int(input())): query = input().split(" ") if query[0] == "1": arr.append(query[1]) elif query[0] == "2": arr.pop(0) else: print(arr[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 →
YES I CHEATED but it was fun to see it passing all test cases