LeetCode: https://leetcode.com/problems/merge-two-sorted-lists/
You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted list and return its head.
i
1
0
2
1
4
2
|
3
j
1
4
3
5
4
6
merged=[]
Step 1 / 7
Step 1:
Initialize dummy and tail. Compare list1[0] and list2[0].
Pointers: i=0, j=4
Focus: compare @ [0, 4]