CS205
Implement Doubly LinkedList addLast()Step 1 of 3
1
2
3
Create node and handle empty case

Create a new node. If the list is empty (tail is null), set both head and tail to the new node.

Loading editor...
Learning Objectives
  • Understand doubly-linked node structure
  • Update both prev and next pointers
  • Handle empty list case