JNU 2018-2 PhD CS
October 26, 2023JNU 2018-2 PhD CS
October 26, 2023JNU 2018-2 PhD CS
Question 19 |
The time complexity of inserting a node in a doubly linked list is
O(n2 log(n)) | |
O(n log (n)) | |
O(log (n)) | |
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
Subscribe
Login
0 Comments