Oracle
Company
Programming
Database
Which of the following operations cannot be implemented in O(1) for a unsorted singly linked list with head and tail pointers?
a) deletion of the last node
b) Insertion at the end
c) Deletion of the front node
d) Insertion at front
Read Solution (Total 6)
-
- a) deletion of the last node
- 7 years agoHelpfull: Yes(1) No(0)
- answer is A) deletion of the last node
- 7 years agoHelpfull: Yes(1) No(0)
- a) deletion of last node
- 7 years agoHelpfull: Yes(1) No(0)
- A) deletion of last node
- 6 years agoHelpfull: Yes(1) No(0)
- D) Insertion at front
- 6 years agoHelpfull: Yes(0) No(1)
- Deletion of the last node. As you can't simply delete the last node if you do you'll lose the tail pointer. first, you need to point at the second last node for which you have to start from the head. it'll take more than O(n).
- 6 years agoHelpfull: Yes(0) No(0)
Oracle Other Question