Discussion :: Data Structure MCQs
- What is the time complexity of inserting a node in a doubly linked list?
Answer : Option C
Explanation :
In the worst case, the position to be inserted maybe at the end of the list, hence you have to traverse through the entire list to get to the correct position, hence O(n).
Be The First To Comment