Question: What is the time complexity of deleting the last node in a singly linked list?
Options:
Correct Answer: O(n)
Solution:
To delete the last node in a singly linked list, you must traverse the list to find the second-to-last node, resulting in O(n) time complexity.