InterviewSolution
| 1. |
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 listThis intriguing question originated from Singly Linked List Operations topic in section Abstract Data Types of Data Structures & Algorithms IThe question was posed to me during an online exam. |
|
Answer» Right choice is (c) Delete the last element of the list |
|