leetcode 536 Construct Binary Tree from String

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 42

  • @amijugjug
    @amijugjug 3 года назад +12

    Make playback speed to 1.25 and use earphones.

  • @ruhigarga9542
    @ruhigarga9542 3 года назад

    Your way of explaining the logic on the whiteboard and then again via code is super awesome!

  • @AdityaSingh-ql9ke
    @AdityaSingh-ql9ke 2 года назад

    Awesome, your way of explaining is really what learners newd.

  • @mandeep2192
    @mandeep2192 2 года назад

    woww explained so beautifully.

  • @mrprime557
    @mrprime557 2 года назад

    Amazing !!!!!! Love it

  • @shaikmohammedrafi3309
    @shaikmohammedrafi3309 3 года назад +1

    thanks bro for explaning

    • @codebix1096
      @codebix1096  3 года назад

      Happy to help
      Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true

  • @REGULUS2106
    @REGULUS2106 2 года назад

    perfact

  • @ritikagupta8847
    @ritikagupta8847 3 года назад +5

    What is the time and space complexity?
    Time is O(n) and space complexity is also O(n): stack space (in case of skewed tree). Am I correct?

  • @vaishaligoyal7478
    @vaishaligoyal7478 3 года назад +1

    Nice explaination

  • @samratganguly
    @samratganguly 4 года назад

    Nice Solution Dude . Easy to understand . It helped .

    • @samratganguly
      @samratganguly 4 года назад

      @@codebix1096 and it's time complexity will be O(n) ??

    • @codebix1096
      @codebix1096  4 года назад +2

      @@samratganguly yes

  • @MrThepratik
    @MrThepratik 4 года назад +2

    precise and well explained

    • @codebix1096
      @codebix1096  4 года назад

      You can subscribe to this channel for more such content 😄

    • @niteshverma8281
      @niteshverma8281 2 года назад

      @@codebix1096 ruclips.net/channel/UCZJRtZh8O6FKWH49YLapAbQ p

  • @ayushkushwaha171
    @ayushkushwaha171 3 года назад +1

    good explanation

    • @codebix1096
      @codebix1096  3 года назад

      Keep watching
      Thank you.
      Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true

  • @adarshmishra5340
    @adarshmishra5340 3 года назад

    thanks bro i was missing one case returning root when it is closing bracket though i was getting the correct ans ,as inorder traversal was same but the structure got different..

  • @amannegi8256
    @amannegi8256 3 года назад +1

    are sir sound system thik kro please adhe subs aisi bdjynge

  • @snehabaser3155
    @snehabaser3155 3 года назад +3

    How u reach to root.right block.. as upper if condition true and it ovveride root.left.
    Please clear my doubt

    • @muskanjain4876
      @muskanjain4876 3 года назад

      Same doubt

    • @lucky_raiser
      @lucky_raiser 2 года назад

      Think of recursion friend, you will get out from middle if() loop so the third if() will run , not the first one. So no overriding here.

    • @niteshverma8281
      @niteshverma8281 2 года назад

      Think of recursion friend, you will get out from middle if() loop so the third if() will run , not the first one. So no overriding here.

  • @lucky_raiser
    @lucky_raiser 2 года назад

    I think fourth if loop is not required, second if loop will take care of it, correct me if i am wrong.

    • @sarveshchavan4391
      @sarveshchavan4391 2 года назад

      No it's required, in fact the if statement on line no 31 is not required, all test cases passed !

  • @shrshawn
    @shrshawn Год назад

    this code misses a critical case which is "()" which represents empty subtree for a given root

  • @rajatmaheshwari4656
    @rajatmaheshwari4656 3 года назад

    starts from 1:00

  •  2 года назад

    Thanks but what if we want to create a generic/n-ary tree instead of binary tree? 🤦‍♀️ really hard to create..

    • @prabhatmishra5667
      @prabhatmishra5667 2 года назад

      Not really, you just have to call recursive function n times in that case with slight modification

  • @SandeepKumar-qw3tv
    @SandeepKumar-qw3tv 3 года назад +1

    sound accha karo yaar kuch samujh me hi nhi aa rha hai

    • @codebix1096
      @codebix1096  3 года назад +1

      Noted.
      Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true

  • @shashankrustagi2812
    @shashankrustagi2812 3 года назад

    If an input is given to me int string like 123NNNN where N is null, how will you construct the binary tree?

  • @AmandeepKaur-ct5mm
    @AmandeepKaur-ct5mm Год назад

    voice too low

  • @古小英-u3y
    @古小英-u3y 4 года назад +1

  • @sumitjindal1115
    @sumitjindal1115 3 года назад

    sir your voice is very low

    • @codebix1096
      @codebix1096  3 года назад

      noted
      Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true