I was asked in a homework assignment to answer a question regarding "Red-Red-Black" trees. The description of a red-red-black tree (copied from somewhere in the internet) is:
"A red-red-black tree is a binary search tree that satisfies the following conditions:
- Every node is either red or black
- Every leaf (nil) is black
- If a node is red and it's parent is red, then both its children are black
- Every simple path from a node to a descendant leaf contains the same number of black nodes (the black-height of the tree)"
I was asked, given a red-red-black tree with n nodes, what is the largest number of internal nodes with black-height k? What's the smallest number?
I've been trying to think about it for more then two hours now, but apart from headache I couldn't get anywhere.
Thanks!