CSE 116 Lecture Notes - Lecture 26: Binary Tree, Memory Hierarchy, Linked List

37 views5 pages

Document Summary

Node is name for links in a tree also: no relation to linked list class; totally different ideas, ea(cid:272)h (cid:374)ode"s data retrie(cid:448)ed (cid:271)y usi(cid:374)g getelement() Node class often used by data structures: (cid:374)ode is (cid:374)ot spe(cid:272)ifi(cid:272), (cid:271)ut it sou(cid:374)ds (cid:271)etter tha(cid:374) (cid:862)thi(cid:374)gy(cid:863, more node classes to be seen, we use them a lot. Longest count to leaf node: d"s height is (cid:1005, b"s height is 3, a"s height is (cid:1008) Height 1 more than taller child: f"s height is (cid:1006, b"s height is (cid:1007, e"s height is (cid:1005) Distance to root node of tree: a"s depth is zero, c"s depth is (cid:1005) Depth of a node is 1 more than its parent. E f: root"s depth is al(cid:449)ays (cid:1004, b, c, & d have depth of 1, e, f, g, h have depth of 2. All trees organize storage in hierarchical manner relies on specific concept: parent-child relationship: does not specify meaning of being parent or child.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents