4 ms·
Xkcd: Tree (humor)
- iwwr 16y agoThat looks like a sparse tree, but what are the rules about coloring the nodes red or green? What about the special case root (yellow)?
- ggchappell 16y agoGood question. I figured the obvious thing to do would be a red-black (or green in this case) tree, but that isn't one. Also, what about the "heap"? When people say "heap", they usually mean a Binary Heap, but the tree of presents is not a Binary Heap. It is also not a Binomial Heap. It might be a possible state of a Fibonacci Heap; I'm not sure.