Consider a singly linked list. What is the worst case time complexity of the best-known algorithm to delete the node $a$, pointer to this node is $q$, from the list?
- A$O(n \lg \: n)$
- B$O(n)$
- C$O(\lg \: n)$
- D$O(1)$
Solve it on GATE DA practice →More Searching & Sorting Algorithms problems