About 1,050,000 results
Open links in new tab
  1. Array implementation of queue – Simple | GeeksforGeeks

    Mar 12, 2025 · To implement a queue of size n using an array, the operations are as follows: Enqueue: Adds new elements to the end of the queue. Checks if the queue has space before insertion, then increments the size. Dequeue: Removes the front element by shifting all remaining elements one position to the left. Decrements the queue size after removal.

  2. C++ Program to Implement Queue using Array - GeeksforGeeks

    May 14, 2024 · In this article, we will learn how to write a program to implement queues using an array in C++. The queue is a linear data structure that has the following properties:- It has mainly 2 pointers to perform operations: Front & Rear. The Rear is …

  3. Introduction and Array Implementation of Queue - GeeksforGeeks

    Mar 5, 2025 · A Queue is a linear data structure that follows the FIFO (First In, First Out) principle. Elements are inserted at the rear and removed from the front. Queue Operationsenqueue(item) - Adds an element to the end of the queue.dequeue() - Removes and returns the first element from the queue.peek() - Re

  4. DSA Queues - W3Schools

    Queues can be implemented by using arrays or linked lists. Queues can be used to implement job scheduling for an office printer, order processing for e-tickets, or to create algorithms for breadth-first search in graphs. Queues are often mentioned together with Stacks, which is a similar data structure described on the previous page.

  5. Queue Data Structure - Programiz

    Queue operations work as follows: We usually use arrays to implement queues in Java and C/++. In the case of Python, we use lists. self.k = k. self.queue = [None] * k. self.head = self.tail = -1 # Insert an element into the queue def enqueue(self, data): if (self.tail == self.k - 1): print("The queue is full\n") elif (self.head == -1):

  6. Data Structures Tutorials - Queue Using Arrays with an example …

    The implementation of queue data structure using array is very simple. Just define a one dimensional array of specific size and insert or delete the values into that array by using FIFO (First In First Out) principle with the help of variables 'front' and ' rear '.

  7. Queue Implementation Using Array: Your One-Stop Solution

    Jul 23, 2024 · Learn queue implementation using arrays in the data structure and execution of supportive queue operations in this tutorial. Start learning now!

  8. Queue in Data Structures - Types & Algorithm (With Example)

    Jan 15, 2025 · To implement queues in data structures, arrays, and linked lists are commonly used, with array queues in data structures being one of the fundamental implementations. In this DSA tutorial, we will examine the queue data structure in detail, including its features, workings, implementation, etc.

  9. C++ Program to Implement Queue Using Array - Online …

    Queue implements the FIFO mechanism i.e., the element that is inserted first is also deleted first. In other words, the least recently added element is removed first in a queue. A program that implements the queue using an array is given as follows ? cout<<"Queue Overflow"<<endl; else { if (front == - 1) . front = 0; .

  10. Queue Data Structure - Online Tutorials Library

    As a small example in this tutorial, we implement queues using a one-dimensional array. Queue operations also include initialization of a queue, usage and permanently deleting the data from the memory. The most fundamental operations in the queue ADT include: enqueue (), dequeue (), peek (), isFull (), isEmpty ().

  11. Some results have been removed
Refresh