Binary tree maximum path sum | Leetcode #124

preview_player
Показать описание
This video explains a very important interview programming question which is to find the maximum path sum in a binary tree. This is a very important binary tree question and the problem is very similar to finding diameter of a binary tree. I have explained the intuition for solving this problem including all the cases to be handled. I have explained the code flow with proper examples and code explanation is present at the end of the video.As usual, CODE LINK is present in the description below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

Similar Problem:
Рекомендации по теме
Комментарии
Автор

1:09 - EXAMPLE 2 IS INCORRECT. max sum = 6 (not 5) and includes the root, and the rightest node

uwontlikeit
Автор

Sir, this explanation deserves much more applaud, that's why I shared your channel to all my juniors.

shubhiagarwal
Автор

Seen a few explanations on YouTube, this is the best one so far, way to go!

yimingzhao
Автор

Well explained with example 🍁, Smart way by using the three cases it clear all my doubts 👍🏻.

jagdishwarbiradar
Автор

The example which you have illustrated where the sum was 5, the maximum sum we can achieve is 3->2->(-1) ->2 sum=6

punittiwari
Автор

Probably the best explanation of this problem on You Tube .. Thanks Man

dumbcurious
Автор

Such a great explanation! I just watched the video to understand the algorithm and you explained it so good! Then coded the algorithm by myself and the solution got accepted in the first try! Subscribed.

saharshrathi
Автор

Really good explanation. I started to understand the logic when with a playback speed of .75. Thanks

babumon
Автор

worlds best video, sir aur bnayo aisi interview bit se lekr, clear all the doubts

deepanshu
Автор

This is the best explanation I have come across for this question.

sankarikarthick
Автор

One of the best explanation Surya. Thanks

MyLifeMyWorld
Автор

Nice! The only explanation I understood on YouTube :-)

sangramkapre
Автор

Best channel in the youtube for data structures and algorithms👌👌

m.praneethreddy
Автор

Nice explanation!! The solution felt really intuitive after looking at this video

mikasaackerman
Автор

The way in which you explained this complex problem is lit💥
Keep it up👍

raviagarwal
Автор

explanation....U just made a hard problem look so easier . Explanation is awesome :)

harshagarwal
Автор

Respect for the effort! 🙃.
Thank you for the great content and please, if you are comfortable, teach us about graphs after the leetcode saga😅

lemax
Автор

Excellent explanation! Best Video for Binary tree maximum path sum

sayyadalikhan
Автор

Very good explanation of the Cases. Thank You !

aneeshsharma
Автор

Damn!! It was leetcode HARD I understood at one go. Kudos to you ! You provide quality content. Keep making videos and thank you so much.

tarunsingh
visit shbcf.ru