
Linked List Insertion
Quiz
•
Computers
•
Professional Development
•
Medium
Madras Institute of Technology
Used 9+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Insertion of an element at the middle of a linked list requires the modification of how many pointers?
3
1
2
4
Answer explanation
2 pointers are needed to be modified for insertion in the middle of a linked list, the node before the node to be inserted and the node which is being inserted
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity to insert an element to the front of a LinkedList
(head pointer given)?
O(n)
O(1)
O(log n)
None of the above
Answer explanation
We set the next node to the head of the list, and then return that node as the new head.It requires a time complexity of O(1)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity to insert an element to the rear of a LinkedList
(head pointer given)?
O(n)
O(1)
O(log n)
None of the above
Answer explanation
We need to traverse to the end of the LinkedList and set it next to the new element. So, the traversal will take O(n) time complexity
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which part of code represents the statement "Assign newly created node’s next ptr to current head reference. So, it points to the previous start node of the linked list address"
newNode ->data=data
newNode ->next= *head
*head = newNode
struct Node newNode = (struct Node ) malloc (sizeof (struct Node))
Answer explanation
newNode - >next== *head
Assigns newly created node’s next ptr to current head reference. So, it points to the previous start node of the linked list address
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the space complexity needed to store a linked list of n nodes?
O(1)
O(n)
O(n^2)
None of the above
Answer explanation
For n nodes we need a space complexity of O(n)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following linked list operation takes O(1) time?
Insert element at start of the list
Insert element at end of the list
Find length of the list
None of the above
Answer explanation
Only inserting an element at start of linked list takes O(1) time.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Using the above code try inserting 25 after 3rd position for the following linkedlist,
20 16 12 10 14 18 11
Then where does 25 lie between
between 16 and 12
between 12 and 10
between 10 and 14
None of the above
Answer explanation
Inserting 25 leads to insertion between 12 and 10.Since element 12 is in the 3rd position
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
14 questions
ABREDES - Devasc Python
Quiz
•
Professional Development
15 questions
Kuiz MS Word
Quiz
•
Professional Development
11 questions
FDE cycle
Quiz
•
Professional Development
12 questions
Python8
Quiz
•
Professional Development
10 questions
GENERAL KNOWLEDGE
Quiz
•
Professional Development
10 questions
Ice Breaker Challenge- Guess the Tool by Its Logo
Quiz
•
Professional Development
13 questions
TIP Trivia
Quiz
•
Professional Development
10 questions
Digital Tools in Education Pre-Test
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
