You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?

Q & ACategory: Data ScienceYou are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
Admin Staff asked 4 years ago

You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
a) Delete the first element
b) Insert a new element as a first element
c) Delete the last element of the list
d) Add a new element at the end of the list

1 Answers
Admin Staff answered 4 years ago

c) Delete the last element of the list