Suppose an unordered list has its representation as a singly linked list with a head and tail pointer (i.e., pointers to the first and last nodes in the list). Given that representation, which of the following operations could be implemented in O(1) time?
I. Insert item at the front of the list
II. Insert item at the rear of the list
III. Delete front item from list
IV. Delete rear item from list
1
I and III
2
I, II, and III
3
I, II, and IV
4
all of them