Binary Search Tree in Java - 2: Delete a node of binary search tree

preview_player
Показать описание


In this video, we're going to reveal exact steps to delete nodes in Binary Search Tree in Java

This Problem is synonym of following problems:

How to delete nodes in Binary Search tree
Binary Search tree delete
Binary Search tree deletion algorithm
Binary Search tree in Data Structure
Binary Search tree deletion in Java
BST deletion
BST Insertion
BST Data Structure
BST,
Binary search tree,
java,

Please check video for more info:

CHECK OUT CODING SIMPLIFIED

★☆★ VIEW THE BLOG POST: ★☆★

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 200+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★

★☆★ Send us mail at: ★☆★

Рекомендации по теме
Комментарии
Автор

At [12.35]: It'll be 'node.right = delete(node.right, successor.data)'; rather than 'node.right = delete(node.right, 4)';

CodingSimplified
Автор

You just simplified the concept of bst deletion !!! Others just glorify the deletion as a complex 3 case problem and still keep you scared and confused . Yours give a life time intuition that stay for long time . I am wondering like why this problem didn't felt so simple before this video . Thank you !!

saurabhc
Автор

You're the man brother, after a few videos and an overwhelmed evening of relearning BSTs, makes SO much more sense.

flexerfadrigalan
Автор

Most precise level of teaching ...really amazing...because of your tutorial got to learn properly about Binary Search Tree..thanks!

munazzainamulhaque
Автор

Your teaching style is amazing. I've learned a lot about tree data structures from your videos. Thank you for your time and effort. 🙂👌

sanketpatil
Автор

Super great video!!! Finally able to learn deletion in bst after so much stress for not able to find reliable source 😇.
Keep it up Sir!!!!

amazinglife
Автор

getSuccessor-methods while loop should check if temp.left is null instead of checking temp, that is: while(temp.left != null) instead of while(temp != null), otherwise there will be a nullPointerException when trying to delete a node that has two children.

Otherwise, very helpful. Thankyou!

raitsu
Автор

in the else part where you called delete function howcome your are sending 4 as a key value shouldnt be there .data ?

rishabhsingh
Автор

Works for most cases but fails when the key to be deleted is in the root node.

ShreyanGoswami
Автор

thank you so much you are A great teacher this lesson helps me a lot

asmhanalnazly
Автор

The video was very clear and nice I learnt a lot from your videos..Thanks

meditationandrelaxationmus
Автор

This video is super helpful! Thank you!

yichen
Автор

instead of 4 use successor .data it works

chaitanya
Автор

The debugging helps, ....
Verbal explanation needs repair

abdulrehmaan
Автор

what is the need of if(node.left==null || node.right==null)?.can i write if(node.left==null && node.right==null){ return null; }

surajankita
Автор

why you debug instead of run the code.

shouvikdutta
Автор

Amazing explanation
please tell how to check if a tree is bst

surajgrandhi
Автор

Can we able to delete the root node using this code sir.

sathiyakala
Автор

I am implementing delete method in void and I am having a problem to delete node can you please check that.

naman
Автор

I wonder why you put (4). What if you don't know the leftmost node of the right node. Kindly explain

charisbaafi