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

  Рет қаралды 23,513

Anuj Kumar Sharma

Anuj Kumar Sharma

Күн бұрын

Пікірлер: 22
@chirayumodi7710
@chirayumodi7710 3 жыл бұрын
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 2 жыл бұрын
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. 3 жыл бұрын
Great 👍 Must see for practicing questions!
@thakurrakeshbehera1446
@thakurrakeshbehera1446 3 жыл бұрын
❤ U BRO...... ❤❤❤❤❤
@nikhiljaiswal9763
@nikhiljaiswal9763 3 жыл бұрын
Bhaiyaa plz make playlist for all practice questions
@shreyagupta8113
@shreyagupta8113 3 жыл бұрын
Please complete this playlist fast
@mohammadsheesh
@mohammadsheesh 3 жыл бұрын
Hi bro 👋
@igaming_
@igaming_ 3 жыл бұрын
Please make one on split BST...
@dakshlakhotiya4275
@dakshlakhotiya4275 3 жыл бұрын
Bhaiya... Please make a vedio on binary lifting algorithm for kth ancestor in a BT🙏. Not much is available on KZbin.
@sportsknowledge92
@sportsknowledge92 3 жыл бұрын
Hello Sir please make a video for why people are agree working extra time in company.
@sahilkumar4078
@sahilkumar4078 3 жыл бұрын
bro!! System design problems pr bhi kuch content daloo!! pls, facing so much problems during machine coding round!
@anujkhare3815
@anujkhare3815 3 жыл бұрын
bhaiya please make video on next permutation question
@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
@sahilalikhan5190
@sahilalikhan5190 3 жыл бұрын
1st comment ❤️
@abdulmajidshaikh300
@abdulmajidshaikh300 3 жыл бұрын
bhaiya please one video , class ,methods, linkedlist ,stack ,queue, fully basic please please
@AnujBhaiya
@AnujBhaiya 3 жыл бұрын
Please refer to the Collection framework in one video. It'll help
@abdulmajidshaikh300
@abdulmajidshaikh300 3 жыл бұрын
@@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.
@aniankiraja689
@aniankiraja689 2 ай бұрын
Provided solution only give first pair, other sets of pairs will not be derived.
@mrrishiraj88
@mrrishiraj88 3 жыл бұрын
🙏👍👍
@karishmayadav1391
@karishmayadav1391 3 жыл бұрын
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 3 жыл бұрын
First
L51. Two Sum In BST | Check if there exists a pair with Sum K
15:06
take U forward
Рет қаралды 163 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
L50. Binary Search Tree Iterator | BST | O(H) Space
14:00
take U forward
Рет қаралды 160 М.
L52. Recover BST | Correct BST with two nodes swapped
15:56
take U forward
Рет қаралды 143 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН