
Linked List Deletion
Authored by Madras Institute of Technology
Computers
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of deleting the last element in the linked list?
O(n)
O(1)
O(n logn)
None of the above
Answer explanation
Deleting the last element of the linked list requires a time complexity of O(n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword can be used to perform deletion operation in linked list?
free
remove
null
erase
Answer explanation
free keyword frees up the memory allocated for the particular node and performs the deletion operation
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
State True/False
A node in singly linked list can be deleted in O(1) if the pointer to node is given
True
False
Answer explanation
A node in singly linked list can be deleted in O(n) if the pointer to node is given
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
State true/false
A node in singly linked list can be deleted in O(1) if the pointer to previous node is given
True
False
Answer explanation
A node in singly linked list can be deleted in O(1) if the pointer to previous node is given
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ALGORITHM
1. Traverse link list to second last element
2. Change its next pointer to null
3. Free the memory of the last node
Consider above algorithm being applied to the linked list 1->2->3->4->5
How does the linked list look like after the operation?
1->2->3->4->5
2->3->4->5
1->2->3->4
1->3->4->5
Answer explanation
The above algorithm perform deletion at the end .So the list would look like 1->2->3->4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What operation does the following algorithm represent?
1. Store the address of the first node in a pointer
2. Move the head node to the next node
3. Dispose or free memory of the pointer node
Deletion at the beginning
Deletion at the middle
Deletion at the end
None of the above
Answer explanation
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list
I and II
I, II and III
I and III
I, II and III
Answer explanation
We know the head node in the given linked list. Insertion and deletion of elements at the front of the linked list completes in O (1) time whereas for insertion and deletion at the last node requires to traverse through every node in the linked list. Suppose there are n elements in a linked list, we need to traverse through each node. Hence time complexity becomes O(n).
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
10 questions
BAI 3 K12 (TT)
Quiz
•
Professional Development
11 questions
KidSS Drone Quiz
Quiz
•
Professional Development
10 questions
USE OF ICT IN THE LEARNING PROCESS
Quiz
•
Professional Development
12 questions
Computer Networking Fundamentals
Quiz
•
Professional Development
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Scratch
Quiz
•
KG - Professional Dev...
10 questions
SQL Sesi 1
Quiz
•
Professional Development
13 questions
ISC2 - Chapter 1 - Module 3 - G2
Quiz
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development