Given the head of a singly linked list, return a new list with the same values.
cur
1
0
3
1
5
2
copied=[]
Step 1 / 3
Step 1:
Initialize dummy and tail to build the copy.
Pointers: cur=0
Focus: select @ [0]
Given the head of a singly linked list, return a new list with the same values.