Linked List and Stack Quiz

Linked List and Stack Quiz

University

19 Qs

quiz-placeholder

Similar activities

Data Structures

Data Structures

University

20 Qs

DS MODULE 3 LINKED LIST

DS MODULE 3 LINKED LIST

University

15 Qs

LINKEDLIST- DSA -2-3

LINKEDLIST- DSA -2-3

University

20 Qs

Quiz - Linked list

Quiz - Linked list

University

14 Qs

Arrays and Linked Lists

Arrays and Linked Lists

University

15 Qs

Data Structures and Algorithm

Data Structures and Algorithm

University

20 Qs

Basics of Data Structure

Basics of Data Structure

University

20 Qs

Prelims - LIST

Prelims - LIST

University

20 Qs

Linked List and Stack Quiz

Linked List and Stack Quiz

Assessment

Quiz

Computers

University

Medium

Created by

mukilan selvaraj

Used 1+ times

FREE Resource

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

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?