Template Function ADS::isRedBlackTree

Function Documentation

template<BinaryNode N, class Red>
bool ADS::isRedBlackTree(N t, Red red)

isRedBlackTree(): the colouring of t, red( u ) telling whether the node u is red, respects the constraints of a Red-Black tree: the root black, no red node with a red child, the same number of black nodes on every path from the root down to a leaf nil; O( n ) time, O( h ) space