Topic 3: Stacks

Topic 3: Stacks

12th Grade

11 Qs

quiz-placeholder

Similar activities

Basic Data Structures - Intro to CS

Basic Data Structures - Intro to CS

12th Grade

15 Qs

List Review Quiz

List Review Quiz

9th - 12th Grade

14 Qs

Data structure - STACK

Data structure - STACK

12th Grade

10 Qs

Unit 5: Lists and Dictionaries

Unit 5: Lists and Dictionaries

9th - 12th Grade

10 Qs

Abstract Data Types

Abstract Data Types

12th Grade

16 Qs

Stack in python

Stack in python

11th - 12th Grade

10 Qs

Quiz 1 - Intro to HTML

Quiz 1 - Intro to HTML

12th Grade

10 Qs

2.3.2. Algorithms for the Main Data Structures

2.3.2. Algorithms for the Main Data Structures

12th Grade

8 Qs

Topic 3: Stacks

Topic 3: Stacks

Assessment

Quiz

Computers

12th Grade

Hard

Created by

najihah ibrahim

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the principle that a stack data structure follows?

Last Come Last Served (LCLS)

Last In First Out (LIFO)

First In First Out (FIFO)

First Come First Served (FCFS)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation is used to add an element to a stack?

Insert

Push

Add

Pop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the term for the end of the stack where elements are added or removed?

Top of stack

End of stack

Middle of stack

Bottom of stack

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an application of stacks?

Managing data in recursion

Heap memory management

Sorting algorithms

Simulation of people entering a lift

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In stack implementation using arrays, what does 'top' represent?

The maximum size of the stack

The current location of the last element

The first element in the stack

The total number of elements in the stack

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you try to pop an element from an empty stack?

It returns null

It does nothing

It throws an error

It returns the last element

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following operation: PUSH(5) on an empty stack?

5

Stack is empty

Stack is full

Error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?