Stack, Queue
✅ Stack
LIFO: Last in First Outpush()pop()
✅ Queue
FIFO: First in First Outoffer()poll()
✅ Deque
- Double End Queue
- queue with both sides open
queue➕stackStack에서 쓰듯이push(),pop()하면 뒤에서 넣고 빼고Queue에서 쓰듯이offer(),poll()하면 앞에서 넣고 뺸다- 💡
Deque가Stack보다 빠르기 때문에 Deque쓰는 것을 추천!
✅
✅
✅
✅
✅
✅
✅
This post is licensed under CC BY 4.0 by the author.