Print diagonal elements in binary tree(code/Algorithm/Program)

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 65

  • @milimishra6447
    @milimishra6447 7 років тому +4

    sir ..u r d only one i found till now who covered these topics of binary tree...thanks alottt...

  • @RaviKumar-vk6ib
    @RaviKumar-vk6ib 4 роки тому +1

    You are an excellent teacher keep up the good work god bless you

  • @momog7312
    @momog7312 5 років тому +2

    This video is great! Nice explanation and clear algorithm! Thank you!

  • @rishigoley3521
    @rishigoley3521 7 років тому +3

    BEST SOURCE TO LEARN ALGOS

  • @dharanyuvi6951
    @dharanyuvi6951 2 роки тому

    Brother thanks for such a clear explanation.., kudos to you

  • @MrKumarrohan
    @MrKumarrohan 4 роки тому

    Thanks you so much sir for the best explanation ever for diagonal elements. Haven't found better explanation than this.

  • @niketkumar7777
    @niketkumar7777 7 років тому

    Bhai.. good approach..Till now i was doing it recursively and finding ways to do it iteratively.. great Man..

  • @ShabnamKhan-cj4zc
    @ShabnamKhan-cj4zc 7 років тому

    Thanks a lot for simple explanation and visiting each every node to show logic.Thanks again.

  • @hiteshusingh8571
    @hiteshusingh8571 3 роки тому

    Nice explanation Sir

  • @akashninave5001
    @akashninave5001 3 роки тому

    BEST EXPLAINATION, THANK YOU, SIR

  • @theWrongInsights
    @theWrongInsights 3 роки тому

    love you sir!!! kya smjhate ho tussi!!....

  • @shristisingh6539
    @shristisingh6539 2 роки тому

    very nice explanation..literally

  • @vm1662
    @vm1662 4 роки тому

    You explain so well!!!!! Superb!! Thank you :)

  • @milimishra6447
    @milimishra6447 7 років тому +2

    the way u teach is also very gud....

  • @rohansodha9555
    @rohansodha9555 3 роки тому

    Excellent !

  • @subhalakshmikumarappan8806
    @subhalakshmikumarappan8806 6 років тому

    Very clear and easily understandable..!!!

  • @shyammahato7178
    @shyammahato7178 4 роки тому

    nice explanation.. thanku sir

  • @hymnish_you
    @hymnish_you 4 роки тому

    Awesome yaar, keep doing!

  • @MsSk8trboy
    @MsSk8trboy 5 років тому

    Great explanation mahn ..... Keep it up

  • @SahilJSawant
    @SahilJSawant 6 років тому +4

    At 22:34 don't you think the traversal should be "dij" instead of "dji"
    btw nice tutorial sir

  • @parmeziaaanoocheese2312
    @parmeziaaanoocheese2312 7 років тому

    great helped in a lot of interviews sir

  • @prashantverma3347
    @prashantverma3347 4 роки тому

    thank you

  • @Sushil2874
    @Sushil2874 5 років тому

    Great explanation..!!

  • @AddieInGermany
    @AddieInGermany 7 років тому +1

    Sir you're THE best

  • @LarryRuane
    @LarryRuane 7 років тому

    Beautiful algorithm! I would not have thought of code this elegant. I'm just curious, did you think of this algorithm by yourself? Or is this a previously-known algorithm (that you have presented so clearly)?

  • @jatinbansal9347
    @jatinbansal9347 4 роки тому

    sir I think more easy way is to use map concept as you have used in vertical order traversal.

  • @prashantgiri1285
    @prashantgiri1285 3 роки тому +1

    Hey, Sir, I am following you for the past 1 year and your videos are very easy to understand and it gives me a lot of confidence to work on.
    I would ask for your help to create a placement series where we would get the 100 best questions discussion covering the entire topic of DS Algo and if that works on. We will be surely hitting big companies on campus for sure.
    ThankYou
    Prashant Giri
    Jadavpur University

  • @ShivangiSingh-wc3gk
    @ShivangiSingh-wc3gk 6 років тому

    beautiful

  • @piyushranjan3075
    @piyushranjan3075 5 років тому

    Mind blowing algorithm

  • @vaibhavkumar903
    @vaibhavkumar903 7 років тому

    kudos!! You made it look simple :)

  • @travelogue4566
    @travelogue4566 7 років тому

    nice explanation

  • @premprakash8220
    @premprakash8220 6 років тому

    nice explanations

  • @naanchilnanban
    @naanchilnanban 6 років тому

    Yours video simply super. Can you please help me how to traversal a full binary tree in circular spiral (not in zigzag way).

  • @tsupreetsingh
    @tsupreetsingh 4 роки тому +1

    thanks bruh

  • @siddharthsethia5986
    @siddharthsethia5986 6 років тому

    Good One sir!

  • @kumarparth444
    @kumarparth444 4 роки тому +1

    sir please upload more problems of binary tree

  • @avikool1
    @avikool1 6 років тому

    Great. Thanks!

  • @somurauniyar2610
    @somurauniyar2610 4 роки тому

    sir thanks a lot ......

  • @nakulamate3558
    @nakulamate3558 4 роки тому

    what is the time complexity of the solution?

  • @srinidhiii
    @srinidhiii 7 років тому

    thank you sir

  • @SuyashSoni248
    @SuyashSoni248 6 років тому

    Why do we need to explicitly specify a condition -
    If (p == null) break;
    The outer loop will anyway end as queue becomes empty at the last. Here is the implementation in Python -
    github.com/suyash248/ds_algo/blob/master/Tree/printDiagonals.py

  • @brijpatel237
    @brijpatel237 3 роки тому

    thanks god :-P

  • @gurupreetsingh8347
    @gurupreetsingh8347 4 роки тому

    sir , plz tim sorting pe details video bana ke samjyo do

  • @yilinyao1999
    @yilinyao1999 5 років тому +2

    讲的很好就是口音真的没字幕听不懂。

    • @vedantdeshmukh1778
      @vedantdeshmukh1778 Рік тому +1

      如果没有翻译,您的评论会更加不全面。顺便问一下,你好吗?

  • @veerrajuyeleti8541
    @veerrajuyeleti8541 7 років тому

    sir could you upload on find the node in a binary tree having duplicate subtrees

    • @vivekanandkhyade
      @vivekanandkhyade  7 років тому

      yes sure Veerraju.

    • @vivekanandkhyade
      @vivekanandkhyade  7 років тому +2

      Hey VeerrRaju.....did u check the diagonal elements of a binary tree video.....u had asked for it....i m very happy to help u with that video.

    • @veerrajuyeleti8541
      @veerrajuyeleti8541 7 років тому

      sir i checked it

    • @harshgupta9761
      @harshgupta9761 3 роки тому

      @@vivekanandkhyade sir diagonal traversal is not uploaded on your github account

  • @ArpitDhamija
    @ArpitDhamija 4 роки тому +1

    its - d,i,j not d,j,i

  • @abrahamwilliam1260
    @abrahamwilliam1260 6 років тому

    By this method u can solve in O(N) and not itn O(n^2)
    public static void Diagonal(Node root, Map h){
    LinkedList q= new LinkedList();
    q.add(root);
    while(!q.isEmpty()){

    // for(int i=0;i

  • @vivekoberoi06
    @vivekoberoi06 5 років тому

    Great explanation. Please avoid saying bad about other websites, it doesn't give out a good impression. People will give you the credit for the amazing videos anyway. Thanks from your well wisher

  • @coderajput1816
    @coderajput1816 7 років тому

    where is its program

  • @kasa007
    @kasa007 6 років тому

    Sir....I could be able to find this whole program on ur github account

    • @amitkumarsingh5414
      @amitkumarsingh5414 4 роки тому

      void diagonalDistanc(Node * root, int d, map &v ){
      if(!root) return;
      v[d].push_back(root->data);
      diagonalDistanc(root->left, d+1, v);
      diagonalDistanc(root->data,d,v);
      }
      Rest you can print it.

  • @saniltalauliker351
    @saniltalauliker351 6 років тому

    With each algorithm you discuss, will you also please provide examples of best and worst time complexity for the same

  • @igaming_
    @igaming_ 2 роки тому

    Very difficult

  • @nayankurude6369
    @nayankurude6369 7 років тому

    13:02 You missed out on marking u as 2.