Two Sum in BST | Pair Sum in BST | Two sum Problem in Binary Search Tree | DSA-One Course #71

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

КОМЕНТАРІ • 22

  • @chirayumodi7710
    @chirayumodi7710 2 роки тому +18

    This can be done without extra space given that we are allowed to modify the tree.
    Convert BST to sorted doubly linked list (via in order traversal) and then apply 2 sum.

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

      Thanks for this approach :)

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

      Nice. But the conversion to DLL might take up stack space if done via recursion (although space will be less than O(n))

  • @itskhubaib.
    @itskhubaib. 2 роки тому +1

    Great 👍
    Must see for practicing questions!

  • @shreyagupta8113
    @shreyagupta8113 2 роки тому +1

    Please complete this playlist fast

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

    Bhaiyaa plz make playlist for all practice questions

  • @dakshlakhotiya4275
    @dakshlakhotiya4275 2 роки тому +1

    Bhaiya... Please make a vedio on binary lifting algorithm for kth ancestor in a BT🙏. Not much is available on UA-cam.

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

    Please make one on split BST...

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

    Hello Sir please make a video for why people are agree working extra time in company.

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

    bro!! System design problems pr bhi kuch content daloo!! pls, facing so much problems during machine coding round!

  • @mohammadsheesh
    @mohammadsheesh 2 роки тому +2

    Hi bro 👋

  • @aniankiraja689
    @aniankiraja689 14 днів тому

    Provided solution only give first pair, other sets of pairs will not be derived.

  • @aniketengilife
    @aniketengilife Рік тому

    same problem with time complexity O(n) and space complexity O(log n) by using 2 stacks instead of an array. can you make a video on that

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

    bhaiya please make video on next permutation question

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

    ❤ U BRO...... ❤❤❤❤❤

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

    bhaiya please one video , class ,methods, linkedlist ,stack ,queue, fully basic please please

    • @AnujBhaiya
      @AnujBhaiya  2 роки тому +1

      Please refer to the Collection framework in one video. It'll help

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

      @@AnujBhaiya collection framework in one video is very helpful but that topic(linkedlist ,stack ,queue fully basic) without collection framework .if you have time make video then ok . thank u bhaiya.

  • @mrrishiraj88
    @mrrishiraj88 2 роки тому +1

    🙏👍👍

  • @sahilalikhan5190
    @sahilalikhan5190 2 роки тому +1

    1st comment ❤️

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

    Hello bhaiya, i wanted to ask that if I learn Java from your java playlist from that 3 videos then will it be enough to apply for the java developer position?

  • @arpanmaheshwari2290
    @arpanmaheshwari2290 2 роки тому +1

    First