큐[QUEUE]의개념 Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both its ends. One end is always used to insert data (enqueue) and the other is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first. First In First Out Basic Operation Queue operations may involve initializing or defining the queue, utilizing it, and then completely erasing it from the memory. Here we shall try to understand the basic operations associated with queues − enqueue() − add (store) an item to the queue. dequeue() − remove (access) an item from the queue. Few more functions are required to make the above-mentioned queue operation efficient. These are − peek() − Gets the element at the front of the queue without removing it. isfull() − Checks if the queue is full.[Boolean] isempty() − Checks if the queue is empty.[Boolean] 큐의사용 예 너비 우선 탐색(BFS, Breadth-First Search) 구현 처리해야 할 노...
습득한 프로그래밍 지식을 블로그를 통해 남기는 곳입니다.