Heap - Find Median of Running stream of Integers | Google Interview Question | DSA-One Course #35

  Рет қаралды 68,112

Anuj Bhaiya

Anuj Bhaiya

2 жыл бұрын

Hey guys, In this video, We're going to solve a very important problem called - Find Median of running stream of integers.
Get 10% off on Educative: www.educative.io/anuj
Find the problem statement here: www.educative.io/module/lesso...
🥳 Join our Telegram Community:
Telegram channel: telegram.me/realanujbhaiya
Telegram group: telegram.me/dsa_one
🚀 Follow me on:
Instagram: / anuj.kumar.sharma
Linkedin: / sharma-kumar-anuj
Twitter: / realanujbhaiya
💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!
📚 Complete DSA Playlist: • DSA-One Course - The C...
Complete Android Development Playlist: • Android Development Tu...
Hashtags:
#anujbhaiya #dsaone
Ignore these tags:
median of running stream of numbers
find the median of running stream of numbers
median of stream of running number
find median of data stream
find median from data stream
295 find median from data stream
median of stream of integers
median in a stream of integers
median of stream integers
median
median in a stream of integers using heap
median of medians
stream of integer
median of integers
median of medians algorithmm
stream of numbers
find the median of running stream of numbers
median of running stream of numbers
median of stream of running number
heap
find median of data stream
median of data stream
find the running median
median
295 find median from data stream
find the running median hackerrank
find the running median python solution
running median
find the running median hackerrank python
find the running median hackerrank solution
median of datastream
google interview
google coding interview
google
google interview tips
google interview questions
google interview questions and answers
google interview advice
google interview question
google jobs
coding interview
google coding interview questions
google coding interview question and answer
google interview questions software engineer
google technical interview
google software engineer interview
life at google
interview question

Пікірлер: 101
@ankittjindal
@ankittjindal 2 жыл бұрын
Thnq bhaiya video k lye!!!! Bs DSA ki frequency ki thori increase kr dijiye
@shivangisrivastava1158
@shivangisrivastava1158 2 жыл бұрын
Best explanation with code! thanks bhya.
@sampurnguide433
@sampurnguide433 2 жыл бұрын
It's great job bhaiya for help in selection of product based companu
@VishalYadav-gk1kg
@VishalYadav-gk1kg 2 ай бұрын
Very nice explanation sir, Thank you!
@sharuk3545
@sharuk3545 2 жыл бұрын
Awesome and precise solution
@ssrpic
@ssrpic 2 жыл бұрын
This is a very good and comprehensive course on DSA. Thanks for these uploads.
@auroshisray9140
@auroshisray9140 Жыл бұрын
Great Explanation! Thanks Bhaiya
@agyaani8060
@agyaani8060 2 жыл бұрын
Loved it bhaiya❤....Thanks a tonne✨✨
@signaturecomics7223
@signaturecomics7223 2 жыл бұрын
Finally got this concept thanks you bhyaa
@natureforever8819
@natureforever8819 2 жыл бұрын
Thanks a million🔥🔥🔥🔥
@204_supriyamishra3
@204_supriyamishra3 2 жыл бұрын
Thanks Bhaiya , dsa in java u are pro max
@yatri6329
@yatri6329 2 жыл бұрын
Thanks it help me to understand
@adimishra3046
@adimishra3046 2 жыл бұрын
Thank you bhaiya
@rishabsharma5307
@rishabsharma5307 2 жыл бұрын
Can you make more videos on median type questions like find median in unsorted array, median in sorted matrix etc
@startupmindset7597
@startupmindset7597 Жыл бұрын
bhiya mene pehle hi solution soch liya thea.....or mera solution ekduuuuuuuuuuuuuum correct nikla
@saikeerthanchiluka4027
@saikeerthanchiluka4027 11 ай бұрын
Super bhaiyya thank you
@pcog1216
@pcog1216 2 жыл бұрын
Best code for this question.
@nikhilkumarjamwal5322
@nikhilkumarjamwal5322 4 ай бұрын
Nice One!👍
@jayeshkaushik2975
@jayeshkaushik2975 2 жыл бұрын
Hey bhai i wanna meet you u r so Inspiring. Thanks for such educative videos.. 🔥
@abhishekkamboj7150
@abhishekkamboj7150 2 жыл бұрын
Nice video brother 👍👍
@amitkandalkar6002
@amitkandalkar6002 2 жыл бұрын
Aisihi frequency se videos chahiye bhaiya 🔥
@ahmadwaheed8003
@ahmadwaheed8003 2 жыл бұрын
Thanks
@BackToBoi
@BackToBoi 2 жыл бұрын
I am studing bit manipulation from apna college channel, seriously anuj bhiya un logo ne 11 minutes me samjaya hai par 0.0000000000001% bhi mujhe samaj nhi. Thanks for uploading videos on bit manipulation. The thing that it doesn't matter that in how much less time you are making videos, the concept must be clear. Apna college focuses on to make video on less time which makes it worst video in that playlist of c++ course tillbit manipulation.
@RaviPrakash-rt9vx
@RaviPrakash-rt9vx 8 ай бұрын
Can someone explain how time complexity is O(log n). As I know for creating max or min heap tc is O(n) if there are n element . In this case we have divided the elements in two part i.e. min & max Heap means half of element will go in max & half will go in min heap . so creation of maxHeap & min Heap individually take O(n/2) and insertion of an element will take log (n/2).so overall complexity will be O(nlogn). Please explain if my understanding is incorrect.
@abhaychouhan1511
@abhaychouhan1511 2 жыл бұрын
Please make video for BCA students Internship Off campus placement NIMCET prepation tips
@karanrajput9420
@karanrajput9420 2 жыл бұрын
Bhaiya! plz share your experience that how did your learnt blockchain and made project on it.means resorse which followed to made project on blockchain???
@technorahulroy1408
@technorahulroy1408 2 жыл бұрын
Please make a hole course of blockchain development with a project.
@shivanshupandey9535
@shivanshupandey9535 2 жыл бұрын
Bhaiya agr hm Mean input ke saath calculate krte jaye aur mod find kre phir Mode=3meadian-2mean use kre.ye shyd o(log n) complexity ka hoga
@abhaysolanki1819
@abhaysolanki1819 2 жыл бұрын
can we do this by quick sort..
@Dead_Zone_0922
@Dead_Zone_0922 2 жыл бұрын
Hlw Annaaaaaaaaa thank for everything which i learnt from u , i,and most of the students want to know if im not doing B-tch , nd im doing BCA , other graduation nd still my collage ranking is no too good can i get job in big companies like google,fb, amazone ...... plz make a video on it bhaiya plzzzzzz
@abrarawsaf7282
@abrarawsaf7282 2 жыл бұрын
Bhai can you teach tries and dijkstras.
@sourabhthakre4125
@sourabhthakre4125 2 жыл бұрын
Its really most easy , concise , simple code . I have gone through all the options before making that comment. Thanks
@643kanavguleria9
@643kanavguleria9 2 жыл бұрын
can we also do this with only one priorityQueue (max heap) by just removing max element until we reach at the (n/2+1) element in odd(n) or in even (n) (avg of n/2 + 1 and n/2 the element)
@animeshsingh3748
@animeshsingh3748 Жыл бұрын
That approach is okay for one testcase but here the question demands a running stream, so according to your approach you've already lost half of the numbers.
@siddhantarath2199
@siddhantarath2199 2 жыл бұрын
Nice one 👍 increase the frequency of video uploads on #DSA course. Thank you 😊
@saisravani2625
@saisravani2625 2 жыл бұрын
bhayia , could u pls suggest best resource for deign patterns in java??
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
I'm following this one: www.educative.io/courses/software-design-patterns-best-practices and a book called - Head first Design patterns from O'Reily
@itz_me_imraan02
@itz_me_imraan02 2 жыл бұрын
Imp part of this course is that you cover imp questions 💜💛
@Dead_Zone_0922
@Dead_Zone_0922 2 жыл бұрын
< Hlw Annaaaaaaaaa > thank for everything which i learnt from u , i,and most of the students want to know if im not doing B-tch , nd im doing BCA , other graduation nd still my collage ranking is no too good can i get job in big companies like google,fb, amazone ...... plz make a video on it bhaiya plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
@jatingoyal9575
@jatingoyal9575 2 жыл бұрын
software developer or full stack web developer ma kiya difference ha
@Dead_Zone_0922
@Dead_Zone_0922 2 жыл бұрын
Hlw Annaaaaaaaaa thank for everything which i learnt from u , i,and most of the students want to know if im not doing B-tch , nd im doing BCA , other graduation nd still my collage ranking is no too good can i get job in big companies like google,fb, amazone ...... plz make a video on it bhaiya plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
@lingasodanapalli615
@lingasodanapalli615 8 ай бұрын
It would be great if you can teach it in English rather than in Hindi
@avadheshsingh4255
@avadheshsingh4255 Жыл бұрын
bhaiya suppose for this test case input :- add(1) , findmedian() - the answer should be 1 but we are trying to access maxheap which is null. and it will give us null pointer exception. ?
@shubhampatel7870
@shubhampatel7870 Жыл бұрын
Bhaiya ne to code khudse likha bhi nahi.. faltu aadmi code explain kar raha hai bas
@dippatel6807
@dippatel6807 2 жыл бұрын
We want to know which languages should we learn for software engineer position and how many positions are there in companies and what should we learn for it???? Plzz make a video on this!!
@preetkatiyar969
@preetkatiyar969 2 жыл бұрын
Java
@priyanka-bl4hb
@priyanka-bl4hb 2 жыл бұрын
Hi sir good afternoon I'm currently pursuing my btech from a tier 3 college I have a year gap between my btech and 12th will this effect my placement please sir reply. I have took the gap to prepare for jee mains I couldn't make it but i have got knowledge.sir please reply 🙏
@RaviSingh-qd5pz
@RaviSingh-qd5pz 2 жыл бұрын
No that does not make any difference
@thisissheraf2633
@thisissheraf2633 Жыл бұрын
It’s okay, companies only check your problems solving skills.
@priyankasawant296
@priyankasawant296 2 жыл бұрын
One query While solving dsa questions in java for strings which class of strings is preferable? String class, string builder or string buffer ? I normally do everything only using string class but will the code be more optimized by using the other classes ? Do we actually need to use them ?
@siddhantarath2199
@siddhantarath2199 2 жыл бұрын
string builder is preferable
@devkirandass7930
@devkirandass7930 2 жыл бұрын
@@siddhantarath2199 string buffer is the best because string builder is not thread safe
@riturajanand6508
@riturajanand6508 2 жыл бұрын
@@devkirandass7930 Are threads there while solving DSA questions?
@user-tx3mo1ez2n
@user-tx3mo1ez2n 2 жыл бұрын
StringBuilder is more fast. Use that.
@Shengdanya
@Shengdanya 2 жыл бұрын
Damnnnnn. Kya mast solution hai. Mera approach bohot faltu tha XD
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
Haina mast haina 😬😁
@parasjain120
@parasjain120 2 жыл бұрын
Sir please make a video on blockchain development please sir 🙏🙏
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
Okay
@parasjain120
@parasjain120 2 жыл бұрын
@@AnujBhaiya Thank you sir
@AyushSharma-ux4fk
@AyushSharma-ux4fk Жыл бұрын
TC of insert operation is O(N) not O(log N). Because in every operation you are finding the size of the heap, in order to find the size you will have to visit all the elements. To make it O(log N), along with heaps, maintain heap size as class var and keep on updating and playing on them.
@divyanshsahu271
@divyanshsahu271 11 ай бұрын
Nope, std::priority_queue in c++ returns the size of the heap in O(1), this size is calculated by simply invoking the size of the underlying container.
@raht9578
@raht9578 6 ай бұрын
abe ja na
@user-hq8pt4lv7w
@user-hq8pt4lv7w 2 жыл бұрын
Bhaiya, how to start preparation for software companies ....currently in 1st year bsc computer science Is there any hope for getting a good job in software companies just after passing bsc comp sc as a fresher?
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
Yes, you can still get a Software engineering job. try to stand out - Participate in competitive programming, do internships, freelancing. I can make a first year roadmap if that's required.
@prachi03343
@prachi03343 2 жыл бұрын
@@AnujBhaiya Yes, Bhaiya please...
@user-hq8pt4lv7w
@user-hq8pt4lv7w 2 жыл бұрын
@@AnujBhaiya yes bhaiya, please make a first year roadmap🙏🙏. It is required very much
@ShubhamKumar-pv8pj
@ShubhamKumar-pv8pj 2 жыл бұрын
@@AnujBhaiya yes please
@subscribeinsteadlike2768
@subscribeinsteadlike2768 2 жыл бұрын
@@AnujBhaiya hn bhaiya bnao 1st year roadmap please
@rishonkumarrahi
@rishonkumarrahi 2 жыл бұрын
Bro is Leetcode enough for coding round
@abstergo3565
@abstergo3565 2 жыл бұрын
Bhaiya ds ki course jaldi se khatam kro i need to learn for interview
@a_-1286
@a_-1286 2 жыл бұрын
Ye ques python mei easy but java mei thodi si hard hai
@adityagutte
@adityagutte 2 жыл бұрын
Who else thinks his voice sounds like Jeetu Bhaiya from Kota Factory!
@harmanjeetsingh3556
@harmanjeetsingh3556 2 жыл бұрын
thanks bhaiya.... meri placement ka laddu apko zaroor khilaunga
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
😂😂 jaroor
@tradingjournal5033
@tradingjournal5033 3 ай бұрын
placement hua ki ni?
@Lifeisgood108-33
@Lifeisgood108-33 8 ай бұрын
This question is just too good. I fell in love with this question. Please marry me ❤
@MysteriousLoveSingh
@MysteriousLoveSingh 2 жыл бұрын
Bhyia code vi de dyia karo ji
@codewitharpit1908
@codewitharpit1908 2 жыл бұрын
Ludo game development in android pe videos banaye bhaiya
@Aka_shsin_hA
@Aka_shsin_hA 2 жыл бұрын
You look like TECH BURNER.
@lukamfast8557
@lukamfast8557 2 жыл бұрын
❤️
@anshulsingh1265
@anshulsingh1265 2 жыл бұрын
Bhai mera lappy tut gya h... Koi alternate raasta bta do.. 🙂🙂 Mein 3rd year mein hu..
@lavishgarg4274
@lavishgarg4274 2 жыл бұрын
Bhaiya pls cover Burning tree question,it is not covered anywhere properly
@ankittjindal
@ankittjindal 2 жыл бұрын
Isko hmlg koi or platform pe jakr C++ language me code kr skte h n because I'm a c++ coder!!
@YasirAli-pk8de
@YasirAli-pk8de 2 жыл бұрын
Ofcouse..you can code it on any language
@ankittjindal
@ankittjindal 2 жыл бұрын
@@YasirAli-pk8de ya I know it's not language specific but I can code it on any platform n can I find this qsn on other's platform?
@YasirAli-pk8de
@YasirAli-pk8de 2 жыл бұрын
Go through this link:- www.google.co.in/amp/s/www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/amp/
@ankittjindal
@ankittjindal 2 жыл бұрын
@@YasirAli-pk8de ty brother ab iss qsn ko c++ me kr sknhe ..thnx Yasir Bhai ❤️🙏
@shreyashal8433
@shreyashal8433 2 жыл бұрын
What i do after bcs (bachelor in cs ) no placement in my College i am confused with my 14other friends please reply or make a Video 😭😭😭🙏🏼🙏🏼
@shreyashal8433
@shreyashal8433 2 жыл бұрын
Mai rat bhar nahi So pata yese se please help karo😭😭🙏🏼
@diwakerpragesh2978
@diwakerpragesh2978 2 жыл бұрын
In Today's time doing MCA for becoming SDE in mnc is a good decision or not?? Please reply sir 🙏🏻🙏🏻
@devesh096
@devesh096 Жыл бұрын
yes u can appear for nimcet and get admission into nits
@sarthakgoel1267
@sarthakgoel1267 2 жыл бұрын
Bhai haalat kharaab ho gyi
@thefails2635
@thefails2635 2 жыл бұрын
Lazy content creators !!
@vanshajgoel8783
@vanshajgoel8783 Жыл бұрын
Pada kam advertisement jayada kar rahe ho
@Dead_Zone_0922
@Dead_Zone_0922 2 жыл бұрын
Hlw Annaaaaaaaaa thank for everything which i learnt from u , i,and most of the students want to know if im not doing B-tch , nd im doing BCA , other graduation nd still my collage ranking is no too good can i get job in big companies like google,fb, amazone ...... plz make a video on it bhaiya plzzzzzzzzzzzzzzzzzzzzzzzzz
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
@rehanjutt7016
@rehanjutt7016 2 жыл бұрын
Please share the code of your 4th app (Notes app) from the android 5 projects playlist. Our app is crashing.
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
End To End Data Science Project Implementation In One Shot- Part 1
4:18:05
Find Median from Data Stream
29:28
Techdose
Рет қаралды 53 М.
Binary Search : Median of two sorted arrays of different sizes.
24:48
Tushar Roy - Coding Made Simple
Рет қаралды 539 М.