Algorithms for the Main Data Structures (OCR A-Level Computer Science): Quizzes

📚Quizzes
Stacks
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

What principle does a stack follow?

LIFO (Last In, First Out)

Which operation adds an item to the top of a stack?

Push

Which operation removes an item from the top of a stack?

Pop

What does the Peek operation do?

Returns top item without removing it

What does the IsEmpty operation check?

If the stack is empty

What is stack overflow?

Pushing onto a full stack

What is stack underflow?

Popping from an empty stack

Which use case involves stacks storing return addresses?

Function call management

How can a stack be implemented dynamically?

Using a linked list

In static stack implementation, what value does top start at?

-1

What data structure principle is opposite to LIFO?

FIFO (First In, First Out)

In browser history, what operation adds a visited webpage to the stack?

Push

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Flashcards by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.