
Singly and Doubly Linked List Quiz

Quiz
•
Other
•
University
•
Hard

Niveditha N
Used 1+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line correctly defines a Node in a singly linked list?
class Node {
int data;
Node next;
Node(int d) {
_______________; // ← Fill this}}
this.next = d;
data = d; next = null;
this.data = next;
data = next;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What should go in the blank?
void insertAtHead(int data) {
Node newNode = new Node(data);
newNode.next = ___________; // ← Fill this
head = newNode;}
null
head
newNode
head.next
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
(Double)Which is correct?class DNode {
int data;
DNode next, prev;
DNode(int d) {
data = d;
next = null;
_________; // ← Fill }}
prev = d;
prev = null;
d = prev;
prev = next;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line completes the logic?(Double)
DNode newNode = new DNode(data);
newNode.next = head;
if (head != null)
head.__________ = newNode;
head = newNode;
next
prev
data
pointer
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Complete the code to print the list in reverse:(double)
DNode temp = tail;
while (temp != null) {
System.out.print(temp.data + " ");
temp = ___________;
}
temp.next
temp.prev
head.prev
temp.back
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Combinational Circuits MCQs

Quiz
•
University
20 questions
Week 2 Cardiology Quizz

Quiz
•
University
20 questions
Levels of Management

Quiz
•
University
20 questions
Quizz 2

Quiz
•
University
15 questions
Descriptive Statistics and t-test

Quiz
•
University
17 questions
WN quiz

Quiz
•
University
19 questions
UTEP Stats - Statistical Formulas

Quiz
•
University
20 questions
TECHTRIX2025 BUGHUNT SET1

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Other
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University