Search Header Logo

Linked List and Stack Quiz

Authored by mukilan selvaraj

Computers

University

Used 2+ times

Linked List and Stack Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a node in a singly linked list contain?

Data and pointer to previous node

Data and pointer to next node

Only data

Only pointer

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the head in a singly linked list?

Last node

First node

Random node

Middle node

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you detect if a singly linked list is empty?

If head is not None

If head is equal to 0

If head is None

If head is a string

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation is used to add a node at the beginning?

append

prepend

insert_front

push_back

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you try to delete from an empty list?

Deletes head

Crashes

Error or Exception

Does nothing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to delete the first node?

pop

remove_first

delete_first

shift

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed if you try to print a node object without __str__ or __repr__?

Node content

Nothing

Error

Object memory location

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?