|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Implementation of Linear [Queue using array] (https://www.geeksforgeeks.org/array-implementation-of-queue-simple/). More...
#include <array>#include <iostream>Classes | |
| class | data_structures::queue_using_array::Queue_Array |
| Queue_Array class containing the main data and also index of head and tail of the array. More... | |
Namespaces | |
| namespace | data_structures |
| Data Structures algorithms. | |
| namespace | queue_using_array |
| Functions for [Queue using Array] (https://www.geeksforgeeks.org/array-implementation-of-queue-simple/) implementation. | |
Functions | |
| int | main () |
| Main function. More... | |
Variables | |
| constexpr uint16_t | max_size {10} |
| for io operations More... | |
Implementation of Linear [Queue using array] (https://www.geeksforgeeks.org/array-implementation-of-queue-simple/).
The Linear Queue is a data structure used for holding a sequence of values, which can be added to the end line (enqueue), removed from head of line (dequeue) and displayed.
Values can be added by increasing the rear variable by 1 (which points to the end of the array), then assigning new value to rear's element of the array.
Values can be removed by increasing the front variable by 1 (which points to the first of the array), so it cannot reached any more.
| int main | ( | void | ) |
Main function.
Allows the user to add and delete values from the queue. Also allows user to display values in the queue.
|
constexpr |
for io operations
for std::array Maximum size of the queue