Question bank › Linked List
Dsa Linked List Medium

Merge Two Sorted Linked Lists

You are given two sorted linked lists. Merge these two lists to create a new sorted linked list. The original lists should remain unchanged. The linked lists are represented as space-separated integers ending with -1. Output the final merged list as a space-separated string ending with -1. Example: Input: 1 3 5 -1 2 4 6 -1 Output: 1 2 3 4 5 6 -1

Key concepts

linked_listmergingsorting

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.