Перейти к содержимому

LeetCode 148 | Sort List using Merge Sort (O(n log n)) | C++ Explained

Divyansh Raj Soni

0:00 / 0:00

LeetCode 148 | Sort List using Merge Sort (O(n log n)) | C++ Explained

55 просмотров · 9 мес. назад
Divyansh Raj Soni
3 подписчика
55 просмотров · 9 мес. назад
📝 Description In this video, we solve LeetCode 148 – Sort List using the optimal Merge Sort approach on a singly linked list. 🚀 This solution achieves: Time Complexity: O(n log n) Space Complexity: O(log n) (recursion stack) 🔍 What you’ll learn: How to apply Merge Sort on Linked List Why slow & fast pointers are used Correct base condition to avoid runtime errors Clean & interview-ready C++ implementation Common mistakes students make in this problem