Merge Two Sorted Lists

Problem

Merge two sorted linked lists into one sorted list.

Input / Output

  • Input: the heads of two sorted linked lists.
  • Output: the head of a single merged, sorted linked list.

Constraints

  • 0 ≤ length ≤ 50 each

Example

1->2->4, 1->3->4 => 1->1->2->3->4
added …
LeaderboardSalaryAccount