Author | Message |
---|---|
jrmendoza21
Posts: 9
|
Posted 21:28 Nov 08, 2017 |
If a node has two NIL leaves as children, is that node a Leaf or are the NIL leaves the only (actual) leaves? Eg. /----- NIL 15 - isLeaf(15) == true? and/or - isLeaf(NIL) == true? \----- NIL // assume we are inputting the node which holds 15, not actually 15. Thank you. |
kknaur
Posts: 540
|
Posted 07:13 Nov 09, 2017 |
The NIL leaves are to help make implementation of insertionCleanup and fixDoubleBlack easier. For all other algorithms the NIL leaves are ignored. So 15 would be a leaf. |