n this video, we solve LeetCode Problem #21 — Merge Two Sorted Lists.
You’ll learn:
Basics of Linked Lists
How to merge two sorted lists efficiently
Iterative vs recursive approach
Step-by-step dry run
Time & space complexity
Problem Statement:
You are given the heads of two sorted linked lists list1 and list2.
Merge the two lists into one sorted linked list and return the head of the merged list.
Example:
Input: list1 = [1,2,4], list2 = [1,3,4]
Output: [1,1,2,3,4,4]
Topics Covered:
Linked Lists
Two Pointer Technique
Recursion
Interview Problem Solving