
Single Linked List Concepts

Quiz
•
Other
•
University
•
Hard
Shoba LK
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the basic structure of a node in a single linked list?
A node in a singly linked list consists of multiple data fields without any pointers.
A node in a singly linked list contains only a data field.
A node in a singly linked list has a data field and a pointer to the next node.
A node in a singly linked list has two pointers, one for the next node and one for the previous node.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write pseudocode to insert a node at the beginning of a single linked list.
function addNodeToEnd(head, newData) { newNode = new Node(newData); if (head == null) { head = newNode; } else { current = head; while (current.next != null) { current = current.next; } current.next = newNode; } return head; }
function insertAtPosition(head, newData, position) { newNode = new Node(newData); if (position == 0) { newNode.next = head; head = newNode; return head; } current = head; for (i = 0; i < position - 1 && current != null; i++) { current = current.next; } newNode.next = current.next; current.next = newNode; return head; }
function insertAtBeginning(head, newData) { newNode = new Node(newData); newNode.next = head; head = newNode; return head; }
function deleteFromBeginning(head) { if (head == null) return null; head = head.next; return head; }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Describe the pseudocode for inserting a node at the end of a single linked list.
1. Create a new node. 2. If head is null, set head to new node. 3. Else, set current to head. 4. While current.next is not null, set current to current.next. 5. Set current.next to new node.
1. Create a new node. 2. If head is not null, set head to new node. 3. Set current to head. 4. While current.next is null, set current to current.next. 5. Set current.next to new node.
1. Create a new node. 2. Set head to null. 3. Set current to tail. 4. While current is not null, set current to current.previous. 5. Set current.previous to new node.
1. Create a new node. 2. Set head to new node. 3. Set current to head. 4. While current.next is null, set current to current.next. 5. Set current.next to null.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the pseudocode for deleting a node from a single linked list?
Set head.next = head to delete the node.
1. If head is null, return. 2. If head is the node to delete, set head = head.next. 3. Initialize current = head. 4. While current.next is not null: 5. If current.next is the node to delete: 6. Set current.next = current.next.next. 7. Return.
If head is null, set head to the node to delete.
Traverse the list and print each node's value.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain how to traverse a single linked list and write the pseudocode for it.
Print currentNode.next.value
Pseudocode: 1. Set currentNode = head 2. While currentNode is not null: a. Print currentNode.value b. Set currentNode = currentNode.next
While currentNode is null:
Set currentNode = tail
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of traversing a single linked list?
O(1)
O(n^2)
O(n)
O(log n)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write pseudocode to search for a value in a single linked list.
function locateValue(head, target) { current = head; if (current.value == target) { return current; } return null; }
function searchList(head, target) { for (let node of head) { if (node.value == target) { return node; } } return null; }
function findInList(head, value) { while (head != null) { if (head.value != value) { head = head.next; } } return head; }
function searchLinkedList(head, target) { current = head; while (current != null) { if (current.value == target) { return current; } current = current.next; } return null; }
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Exploring Abstract Data Types

Quiz
•
University
12 questions
DS Quiz

Quiz
•
University
15 questions
Das Quiz von Lektion 1

Quiz
•
10th Grade - Professi...
10 questions
DC Circuit Analysis

Quiz
•
University
9 questions
Induction program Rizz

Quiz
•
University
12 questions
SELF ASSESSMENT (T2)

Quiz
•
University
12 questions
JoJo Siwa 2021

Quiz
•
KG - Professional Dev...
14 questions
In-Lab5

Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Other
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University