Algorithms for the Main Data Structures (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
14 cards from this deck
ShowHide
Practise the cards
14 cards from this deck
What principle do queues follow?
What principle do queues follow?
First In, First Out (FIFO)
FIFO stands for
FIFO stands for
First In, First Out
Enqueue operation
Enqueue operation
Adds an item to the rear of the queue
Dequeue operation
Dequeue operation
Removes an item from the front of the queue
Peek operation in queue
Peek operation in queue
Returns item at front without removing it
IsEmpty operation
IsEmpty operation
Checks if the queue is empty
Data structure used in BFS
Data structure used in BFS
Queue
Dynamic queue implementation method
Dynamic queue implementation method
Using a linked list
Static queue implementation method
Static queue implementation method
Using a static array with fixed size
Circular queue characteristic
Circular queue characteristic
Rear wraps around to front when end of array is reached
Priority queue dequeue basis
Priority queue dequeue basis
Based on priority rather than arrival time
Queue overflow
Queue overflow
Enqueuing into a full queue (static implementation)
Queue underflow
Queue underflow
Dequeuing from an empty queue
Difference: Queue vs Stack principle
Difference: Queue vs Stack principle
Queue uses FIFO, Stack uses LIFO
