Trees: May 2, 2013 Applied Discrete Mathematics Week 14: Trees 1
Trees: May 2, 2013 Applied Discrete Mathematics Week 14: Trees 1
No. Yes.
Yes. No.
James
Christine Bob
bin spool ls
+ -
y z x y
Generic
binary tree
Worst-case
binary tree
Node Struct of Binary Tree
• Possible operations on the Binary Tree ADT
– Parent, left_child, right_child, sibling, root, etc
• Implementation
– Because a binary tree has at most two children,
we can keep direct pointers to them
Convert a Generic Tree to a Binary Tree