INB221 Lecture Notes - Tree Traversal, Binary Search Tree, Binary Tree

74 views3 pages

Document Summary

They are used in biological classifications for living organisms. They are also used for businesses, so that each employee reports to a single supervisor, up to the ceo at the root. Family trees provide a lot of the terminology for the compsci tree structure. Parent and child relationships can be modeled with pointers, so that there"s a direct link between a parent node and achild node. Each node can contain data specific to that node (if you"re modeling a family tree, you"d have the name as the data of the node), and then pointers to its children. The node would be a struct or a class, and then tree as a pointer to a node. Trees are pointers to nodes, and nodes contain trees. If you isolate henry i on the previous slide, the structure of nodes below is a. Picture of data structure of tree on slides. In a binary tree, each tree has at most 2 children.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents