...
JNU 2018-2 PhD CS
October 26, 2023
JNU 2018-2 PhD CS
October 26, 2023
JNU 2018-2 PhD CS
October 26, 2023
JNU 2018-2 PhD CS
October 26, 2023

JNU 2018-2 PhD CS

Question 19
The time complexity of inserting a node in a doubly linked list is
A
O(n2 log(n))
B
O(n log (n))
C
O(log (n))
D
O(n)
Question 19 Explanation: 
Strictly speaking an insertion is simply O(1). The other answers mostly correctly state that the complexity is O(n) if you need to search for the position in which to insert the new node
Correct Answer: D
Question 19 Explanation: 
Strictly speaking an insertion is simply O(1). The other answers mostly correctly state that the complexity is O(n) if you need to search for the position in which to insert the new node
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!