Merge Two Sorted Linked Lists

Given two sorted linked lists, merge them so that the resulting linked list is also sorted.

Statement

We’re given two sorted linked lists. Merge them so that the resulting linked list is also sorted.

Example

Consider two sorted linked lists as an example:

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.