Search Header Logo

110011001100110011

Authored by Michi koh

Computers

Professional Development

Used 1+ times

110011001100110011
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic operations of a stack?

Add, Remove, Check, and Clear

Insert, Delete, View, and Count

The basic operations of a stack are Push, Pop, Peek, and IsEmpty.

Enqueue, Dequeue, Top, and IsFull

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you implement a stack using an array?

A stack can only be implemented using linked lists.

You can only perform enqueue and dequeue operations on a stack.

A stack requires a fixed size and cannot grow dynamically.

A stack can be implemented using an array by maintaining an index for the top element and providing push, pop, and peek operations.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of push and pop operations in a stack?

O(1)

O(log n)

O(n)

O(n^2)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can you explain a real-world application of stacks?

Web browser history management.

Data encryption techniques

File storage management

Task scheduling in operating systems

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens during a stack overflow?

A stack overflow occurs when the memory is completely freed up.

A stack overflow happens when the call stack exceeds its allocated size, often due to deep recursion or excessive function calls.

A stack overflow is caused by insufficient disk space.

A stack overflow happens when the CPU runs out of power.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is stack underflow and when does it occur?

Stack underflow occurs when an item is added to a full stack.

Stack underflow is the condition that occurs when trying to pop an item from an empty stack.

Stack underflow is when the stack size exceeds its limit.

Stack underflow happens when the top item is removed from a non-empty stack.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you implement a stack using linked lists?

Implement a stack using a queue to handle push and pop operations.

Create a stack by using a simple variable to hold the top element.

Use an array to store elements and manage operations with a fixed size.

Implement a stack using a linked list by creating a Node class for elements and a Stack class to manage push, pop, and peek operations.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?