[Coding test] 16. Deque

whitehousechef·2023년 12월 7일

Deque as queue

rotate in circular list

rotate()
https://velog.io/@whitehousechef/%EB%B0%B1%EC%A4%80-2346%EB%B2%88-%ED%92%8D%EC%84%A0-%ED%84%B0%EB%9C%A8%EB%A6%AC%EA%B8%B0-MUST-RETRY

queue

normally has the 'left' keyword in the method name

popleft()

pops the left element

appendleft()

appends to the left of the queue

stack

pop()

pops the right, most recent element added in the stack

append()

appends to the right of the stack

0개의 댓글