728x90
반응형

분류 전체보기 279

[Data Structure] 큐(Queue)

큐(Queue) 입구와 출구가 따로 있는 통로 형태 A collection of elements that are inserted and removed according to the first-in first-out(FIFO) Principle. 가장 먼저 추가된 요소가 가장 먼저 제거됩니다. 모든 삽입(insertion)은 큐의 뒷부분(rear)에서 이루어집니다. 모든 제거(deletion)은 큐의 앞부분(front)에서 이루어집니다. 용어(Terminology): Front: The front of queue, where deletions take place or the position of the first item. Rear: The rear of queue, where insertions take..

[Data Structure] 스택(stack)

스택(stack) 데이터를 쌓아놓은 더미. A collection of elements that are inserted and removed according to the last-in first-out(LIFO) principle. 마지막으로 들어온 요소가 가장 먼저 제거됩니다. Input과 Output은 stack의 가장 맨 위에서만 이루어집니다. 용어(Terminology): Top: The top of stack (default = -1) Push: Insert an item on the top. Pop: Remove the item on the top. 작동(Operation): InitStack: Make stack empty. IsFull: Check whether stack is full...

728x90
반응형