In this tutorial, we'll walk through the process of solving the "Median from data Stream" problem on Leetcode. We'll discuss the problem statement, provide an intuitive explanation of the problem, and demonstrate a step-by-step approach to solve it efficiently.
🔗 Problem Link:
https://leetcode.com/problems/find-me...
Problem Description:
Find the median data stream
🛠️ Solution Link:
https://github.com/mohanmanis/Lecture...
🔗 Custom heap implementation
https://github.com/mohanmanis/Lecture...
Summary:
📚 Understand the problem: We'll start by understanding the problem statement and the constraints given.
🖼️ Visualize the problem: We'll visualize how heap can help us finding the median.
🎯 Approach: We'll discuss the sorting approach, then will improve by maintaining the sorted list then finally using heap to get the median faster.
💻 Implementation: We'll implement the chosen approach with detailed explanations of each step.
🔗 Don't forget to like the video, subscribe for more coding tutorials, and hit the bell icon to stay updated on future content.
⚡️ Timestamps:
0:00 - Introduction
0:29 - How to find median
1:00 - Question explanation
2:30 - Sorting approach, O(nlogn)
3:35 - 2nd approach using insertion sort, O(n)
4:55 - key observations from previous solution
6:03 - Intution of third approach
7:03 - Heap approach using max and min heap
9:05 - cases involving of adding a new number
12:59 - Javascript implementation
🔥 Remember to give the video a thumbs up, hit that subscribe button for more coding tutorials, and ring the bell icon to stay in the loop on upcoming content. Let's master coding together! 🚀🔢💻
#Algorithm #DataStreams #Programming #Coding #subscribenow
#leetcodesolutions #leetcodequestions #blind75 #heap #leetcodeinjavscript 🚀🔢💻
Watch video Find Median from Data Stream( Leetcode online without registration, duration hours minute second in high quality. This video was added by user TechStorming 03 April 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 9 once and liked it 1 people.