# 2-3 B-Tree Deletion

#### ooohffff

1. The problem statement, all variables and given/known data
(P)
/ \
(F) (U)
/ \ / \
(D, E) (J, O) (T) (V)

Given the 2-3 tree, delete F E V from the tree in the given order. Show the tree after each deletion.
2. Relevant equations
Min = 1
Max = 2

3. The attempt at a solution

Remove 'V' : Not sure what to do here

Am I doing this correctly? The algorithm in my book says to replace the target at data(i) with the largest item in subset(i) (rightmost child of left subtree), if I found the target at a node.

#### Attachments

• 37.8 KB Views: 113
Related Engineering and Comp. Sci. Homework News on Phys.org

#### BvU

Homework Helper
Hi,

How about just removing the 'V' node ? It has no subsets, so nothing replaces it.
replace the target at data(i) with the largest item in subset(i) (rightmost child of left subtree)
Can you explain how you remove 'E' ?

### Want to reply to this thread?

"2-3 B-Tree Deletion"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving