deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 26 32
parent
focusNode
isLeftChild == true
25 노드 삭제
deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 26 32
parent
focusNode
isLeftChild == true
삭제하려는 노드 25의 오른쪽 sub
tree 에서 가장 작은 노드를 찾는다
deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 26 32
parent
focusNode
isLeftChild == true
26이 제일 작다
deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 32
parent
focusNode
isLeftChild == true
parent 의 left child 를 26 으로 설
정한다.
26
deleteNode(int key)
75
30
85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 32
parent
focusNode
isLeftChild == true
parent 의 left child 를 26 으로 설
정한다.
26
deleteNode(int key)
75
30
85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18 32
parent
focusNode
isLeftChild == true
26
replacementNode 의 오른쪽 자식
을 삭제노드의 오른쪽 자식으로 연
결시킨다
deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18
32
parent
focusNode
isLeftChild == true
replacementNode 의 오른쪽 자식
을 삭제노드의 오른쪽 자식으로 연
결시킨다
26
deleteNode(int key)
75
30 85
2
15
50
25
By yaboong
https://yaboong.github.io
70
18
32
parent
focusNode
isLeftChild == true
삭제하려는 노드의 왼쪽 sub tree
를 replacementNode 의 왼쪽 자식
으로 연결시킨다
26
deleteNode(int key)
75
30 85
2
15
50
By yaboong
https://yaboong.github.io
70
18 32
parent
삭제하려는 노드의 왼쪽 sub tree
를 replacementNode 의 왼쪽 자식
으로 연결시킨다
26
deleteNode(int key)
75
30 85
2
15
50
By yaboong
https://yaboong.github.io
70
18 32
26
deleteNode(int key)
75
30 85
2
15
50
By yaboong
https://yaboong.github.io
70
18 32 삭제끝
26

Bst delete