Linked List Quiz

Linked List Quiz

University

30 Qs

quiz-placeholder

Similar activities

Data Structures: Placement Preparations

Data Structures: Placement Preparations

University

25 Qs

Data Structure & Algorithm-Quiz-1

Data Structure & Algorithm-Quiz-1

University

30 Qs

Data Structures and  Its Applications

Data Structures and Its Applications

University

30 Qs

DS  Quiz2

DS Quiz2

University

25 Qs

Types of Trees

Types of Trees

University

25 Qs

Trees, Linked Lists, Stacks and Queues

Trees, Linked Lists, Stacks and Queues

11th Grade - University

30 Qs

DS Quiz 1

DS Quiz 1

University

31 Qs

Array and Linked List ADT

Array and Linked List ADT

University

30 Qs

Linked List Quiz

Linked List Quiz

Assessment

Quiz

Computers

University

Medium

Created by

mukilan selvaraj

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a linked list?

A data structure consisting of nodes where each node contains data and a reference to the next node

A linear data structure with a fixed size

A collection of elements stored at contiguous memory locations

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a node in a singly linked list in Python?

class Node: def **init**(self, data, next): self.data = data self.next = next

class Node: def **init**(self, data): self.data = data self.next = None

class Node: def **init**(self, data, prev, next): self.data = data self.prev = prev self.next = next

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of a linked list over an array?

Fixed size

Dynamic size and efficient insertion/deletion

Faster access to elements

Uses less memory

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to traverse a linked list in Python?

While loop

For loop

Recursion

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if a linked list is empty?

if head is None:

if head == "":

if head.next is None:

if head == []:

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of inserting a node at the beginning of a singly linked list?

O(1)

O(n)

O(log n)

O(n log n)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a singly linked list, each node has:

Data and a reference to the previous node

Data and a reference to the next node

Data and references to both previous and next nodes

Only data

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?