
Linked List Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
mukilan selvaraj
Used 1+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Understanding Loops in Programming
Quiz
•
University
25 questions
sheet 3
Quiz
•
University
25 questions
Computer Programming Midterms
Quiz
•
University
25 questions
Quiz No. 2 - The Process of Interaction Design
Quiz
•
University
25 questions
COMP1: Quiz No. 1
Quiz
•
University
25 questions
Layering Models
Quiz
•
University
25 questions
Computer Application TQ1
Quiz
•
1st Grade - University
25 questions
Advanced Game Design Midterm
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
