WWorkday·DSASDE-1Online Assessment
Merge Two Sorted Lists
Problem
Merge two sorted linked lists into one sorted list.
Example
1->2->4, 1->3->4 => 1->1->2->3->4
Constraints
- 0 ≤ length ≤ 50 each
Approach
Dummy head, splice the smaller node each step.
added 6 days ago