python31 18258 Queue2(큐2) with Python3 2023.02.24 0. Background Queue 1 problem in baekjoon has been done but queue 2 problem has to be O(1) in time complexity. I could not solve this on my own and would like to write down here what I've found and learnt to resolve it. 1. Issue 1-1. Queue 1 code n = int(input()) queue = [] commands = [input() for _ in range(n)] for command in commands: if "push" in command: queue.append(int(command.s.. 2023. 2. 24. 이전 1 다음