Stack과 queue는 data structure의 종류이다.
Stack
- "Last In First Out" mecanism.
push()
, pop()
, peek()
- Linked List
- It is faster than queue. (constantly adding and removing data not re-ordering)
Queue
- "First In First Out" mechanism.
enqueue
, dequeue
, size
- Linked List
Call stack
function 호출을 기억하는 data structure.