Mapa mental
Queues

Conteúdo do mapa
Queues
Three types of data
- Elementary - Only a single value is stored
- Char, Boolean, Real, Integer
- Composite - Can hold multiple values
- Arrays, lists
- Abstract - Needs context to be understood
- Queue, Stack
- Elementary - Only a single value is stored
Regular queue
- enQueue(Value) - Adds "Value" to the queue
- deQueue - Remove one item from the queue
- Size - How many elements are in the queue
- IsFull - Asks whether the queue is full
- isEmpty() - Asks whether the queue is empty
- Every time a value is added it is added to the back, and when a value is removed it is from the front.
- This queue isn't very good as it can easily run out of space
Front - This is where the queue starts
Rear- This is where the queue ends
Circular queue
- This is a queue that moves its pointers whenever a value is added or removed
- Example - If the front is 0 and the rear is 3. If I remove a value then the front becomes 1
- This is better than a regular queue because it is less likely to run out of space
Priority queue
- This prioritises certain pieces of data
- This can be useful as the priority will always get used first
- The disadvantage is starvation. This is where low priority pieces of data doesn't get used
- This is because high priority data keeps joining the queue
Imagens e arquivos do mapa
Informações
- Descrição
- A level Computing Mapa Mental sobre Queues, criado por Lewis Spinner em 27-03-2017.
- Criado por
- Lewis Spinner
- Visualizações
- 5
- Avaliação

