- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Nerd)
I want to write an algorithm that checks if a binary tree has the properties of a $\text{ 2-3 tree }$.
The properties of the $\text{ 2-3 trees }$ are the following :
How could we check if a binary tree satisfies the above properties? (Thinking)
I want to write an algorithm that checks if a binary tree has the properties of a $\text{ 2-3 tree }$.
The properties of the $\text{ 2-3 trees }$ are the following :
- All the leaves have the same depth and hold one or two elements.
- Each internal node:
- either holds one element and has two children
- or holds two elements and has three children
- The tree is sorted
How could we check if a binary tree satisfies the above properties? (Thinking)