CONVERT BINARY SEARCH TREE TO SORTED DOUBLY LINKED LIST | LEETCODE # 426 | PYTHON SOLUTION

Sdílet
Vložit
  • čas přidán 21. 03. 2022
  • In this video we are solving a popular Facebook interview question: Convert BST to Sorted Doubly Linked List (leetcode # 426).
    At first glance this problem is really easy as you can simply do an inorder traversal to parse out all the elements and then link them using a for loop but the problem challenges us to do it in-place which means we have to do the linking as we perform the inorder traversal, adding a bit of a twist to the question. Stay tuned to find out how to solve this interesting question!
    If you enjoyed the video and got some value from it, then consider dropping a subscription to my channel and helping me reach my goal of 1000 subscribers!
  • Věda a technologie

Komentáře • 15

  • @GorakhBorude-codeguru
    @GorakhBorude-codeguru Před měsícem +1

    when I saw LeetCode question , I got scared but after watching your video , it becomes very simple to understand ..! you got new subscriber ..!

  • @annlaosun6260
    @annlaosun6260 Před 19 dny

    omg, thank you thank you thnak you!

  • @luvverma6867
    @luvverma6867 Před 2 lety +1

    Amazing Videos!! Thankful to you !!

    • @crackfaang
      @crackfaang  Před 2 lety +1

      Thank you! Comments like this keep me going

  • @cmdv42
    @cmdv42 Před rokem

    🙌💯✨

  • @subee128
    @subee128 Před 5 měsíci

    Thanks

  • @AmolGautam
    @AmolGautam Před 7 měsíci

    thanks

  • @amandwivedi1980
    @amandwivedi1980 Před 2 lety +1

    Try adding code links for clearness.

  • @michaelhernandez5478
    @michaelhernandez5478 Před 2 lety

    Thank you! How you set up the recursion upon reaching the earliest inorder leaf node makes sense. Would it be possible for you to do a handful of backtracking/brute force combinations/permutations problems? I'm going through 465 Optimal Account Balancing and 679 24 Game specifically, and can't figure out how to structure the recursion properly against the expected result.

    • @crackfaang
      @crackfaang  Před 2 lety +1

      First of all thank you for your support. I’ll add those problems to my work queue and make videos in the near future. Make sure you subscribe so you don’t miss them when they come out 😁

  • @rushikeshbutley7576
    @rushikeshbutley7576 Před 6 měsíci

    I always get the intuition but I very much struggle while coming up with code or putting it in such way that i can write code based on dry run or solution i came up with. I always feel like giving up in middle of doing dry code as I feel I will not be able to solve it. Not sure how am gonna do this in interview 😑

  • @rsKayiira
    @rsKayiira Před rokem

    Great video could you please do LC 636 Exclusive Time of Functions

    • @crackfaang
      @crackfaang  Před rokem +1

      Sure, I’ll do so when I return home from my vacation

  • @alexistm
    @alexistm Před měsícem

    Can this be done without recursion?

    • @crackfaang
      @crackfaang  Před měsícem +1

      Yes, most recursion problem can be solved with an iterative solution and vice versa. Probably some exceptions exist but in general the rule holds true