Maximum Width of Binary Tree || Why Long to Int ? || Binary Tree || BFS || C++/Java/Python

preview_player
Показать описание
In this video, I'll talk about how to solve - 662. Maximum Width of Binary Tree

Maximum Width of Binary Tree || Why Long to Int ? || Binary Tree || BFS || C++/Java/Python

Let's Connect:

Resources you can try:

🎥Channel Playlists

About Channel:
We teach about how you can grow in life & educate about programming in Fun & Intuitional way.

About Me:
I am Aryan Mittal - a Software Engineer, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)

✨ Timelines✨

✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
Рекомендации по теме
Комментарии
Автор


Even the most viewed video on this problem has not explained the edge case of another overflow, which we handle by Long long, This was an interesting Problem, what do you guys think ?? 🤪

ARYANMITTAL
Автор

Integer Overflow waali baat ne dil le liya bhaiya, I got confused ki even after doing 2ll we are storing it in INT, but well explained. Thank you

gauravlokwani
Автор

I've done something similar, but instead by modding. Relying on integer overflows is interesting but troublesome. You're expecting the integer to wrap around, rather than triggering some kind of trap or triggering some exception. This can be troublesome in higher-level languages that consider overflowing a bug/exception. Even in C++, it depends on the judge if they have enabled runtime checks on submitted code or not, in which some compilers like LLVM do support "panicking" on overflowing.
In fact, if you are comfortable in relying on integer overflows, then you don't need to do any re-assigning in the first place, overflowing on both sides will make the difference same regardless.
Great video though! Really well explained. Subscribed.

VivekYadav-dsoz
Автор

Yes, you are the one who explain each and every detail bruh! Thank You!!

mohanseditz
Автор

excellent explanation. I like your "BUT BUT BUT" 😆

HaiNguyen-povw
Автор

Bhaiya, agar hum left side mein bhi overflow hone debge tab bhi shayad difference will remain the same.
Very well explained

RishabhJain-elhh
Автор

Dope explanation. btw we're unable to access the drive link for notes could you fix it?

Surya-qcyi
Автор

Keep comming with daily challenge, i am new to your channel

DineshKumar-pmiu
Автор

leetcode explanation of this question is shit, but after your video its crystal clear .

IconOfSeas
join shbcf.ru