You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
큐의 경우에는 장단점 보다는 (특별히 언급되는 장단점이 없음), 큐의 활용 예로 프로세스 스케쥴링 방식을 함게 이해해두는 것이 좋음.
연습
리스트 변수로 큐를 다루는 enqueue, dequeue 기능 구현해보기
queue_list = list()
def enqueue(data):
queue_list.append(data)
def dequeue(data):
data = queue_list[0]
del queue_list[0]
return data
for index in range(10):
enqueue(index)