BINARY TREE VERTICAL ORDER TRAVERSAL | PYTHON SOLUTION EXPLAINED | LEETCODE 314

In this video we'll be solving Leetcode problem # 314: Binary Tree Vertical Order Traversal. This is quite a simple problem once you realize how to apply some abstract reasoning to the problem space in order to solve the question.
It uses a standard BFS approach to solve the problem with a bit of a twist.

Пікірлер: 20

  • @PIRAISUDANB
    @PIRAISUDANB5 ай бұрын

    unique and good explanation

  • @sayantanchakraborty5106
    @sayantanchakraborty5106 Жыл бұрын

    Amazing explanation, you made it so simple and straightforward ! Thank You👍

  • @janhavidesale8755
    @janhavidesale8755 Жыл бұрын

    Dude you are so good!! Clean and crisp. Hope your channel grows

  • @renxinxie2513
    @renxinxie25136 ай бұрын

    your explanation is amazing, best video for this problem

  • @crackfaang

    @crackfaang

    6 ай бұрын

    Thanks mate, really happy you are finding it useful!

  • @ebenezeracquah478
    @ebenezeracquah478 Жыл бұрын

    Wow! I like the explanation.

  • @anmolojha6851
    @anmolojha6851 Жыл бұрын

    super cool, loved it.

  • @dnm9931
    @dnm99316 ай бұрын

    Thank you! You explained it quite well! Appreciate it!

  • @crackfaang

    @crackfaang

    6 ай бұрын

    Thanks for the kind words. Glad you enjoyed the video

  • @rachnaramkumar
    @rachnaramkumar2 жыл бұрын

    Amazing Explanation! Thank You!

  • @crackfaang

    @crackfaang

    2 жыл бұрын

    Thank you! Make sure you subscribe so you don’t miss future videos

  • @ahobilesh5323
    @ahobilesh532310 ай бұрын

    👏👏👏👏

  • @varunshrivastava2706
    @varunshrivastava2706 Жыл бұрын

    Can you also make a video on BT Boundary level traversal?

  • @software4live
    @software4live2 жыл бұрын

    Awesome! Please make a video on VALID WORD ABBREVIATION.

  • @crackfaang

    @crackfaang

    2 жыл бұрын

    Sure thing, that’s a fun problem. Make sure you subscribe so you don’t miss the video when it comes out

  • @rexogbemudia6196
    @rexogbemudia61966 ай бұрын

    Amazing!!👍

  • @crackfaang

    @crackfaang

    6 ай бұрын

    glad you enjoyed the video! make sure to subscribe if you haven’t already

  • @kirancobi
    @kirancobi2 ай бұрын

    Question: in order to solve this problem if you are seeing the first time, are there any other problem that we should have solved before this, so that thinking about the approach for this problem becomes more intuitive, rather than trial and error ,especially if you have never seen this problem before

  • @pnwrunning
    @pnwrunning2 ай бұрын

    On lines 10 and 11, wouldn't min_x = float('-inf') and max_x = float('inf') instead of the other way around? Moreover, the range function in Python takes ints as min and max so how does using floats work on line 30?

  • @ajitsdeshpande

    @ajitsdeshpande

    2 ай бұрын

    @pnwrunning: No , on line 10 and 11, min_x = float("+inf") is the usual way to find mimimum value in a list. That way any value compared with +inf will be smaller than it (we are using min_x for calculating minimum) . Similar explanation holds for max_x = float("-inf") , any value would me more than that so we get the correct maximum value among the list. I tried in python editor and though there is restriction that python range function needs int types, above code with floats worked fine as values in them were integers (x coordinates) , so when th min_x = min(x, min_x) was executed, the value stored in min_x was integer and so it's type becomes class int, which works fine for range function arguments.