Can you explain this?

Consider a singly linked list of the form where F is a pointer to the first element in the linked list and L is the pointer to the last element in the list. The time of which of the following operations depends on the length of the list?

Delete the element from the last

hello @haseebshaik00
pls mention all options

@haseebshaik00
if these are the options then

image

a) Can be done in O(1) time by deleting memory and changing the first pointer.

b) Can be done in O(1) time,

c) Delete the last element requires pointer to previous of last, which can only be obtained by traversing the list.

d) Can be done in O(1) by changing next of last and then last.