Shift 연산

자바스크립트 배열의 Shift 연산은 모든 원소들을 앞으로 한칸씩 이동시켜야 하기 때문에, 시간복잡도가 O(n)이 된다.

때문에 Queue를 구현할 때는 Linked List(연결 리스트)를 알고 있을 필요가 있다.

This line appears after every note.

Notes mentioning this note


Here are all the notes in this garden, along with their links, visualized as a graph.