JavaScript | Linked List | Question 6

Last Updated :
Discuss
Comments

Which of the following methods can be used to remove the last node in a singly linked list?

pop()

shift()

delete()

Traverse through the list and set the second-last node’s next pointer to null

Share your thoughts in the comments