






















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An in-depth exploration of the tree data structure, including its concepts, terminology, and applications. Trees are a fundamental data structure used to represent hierarchical relationships and store data efficiently. Topics such as tree terminology, tree types, and tree traversals, using examples from phylogenetic data and xhtml documents.
Typology: Summaries
1 / 62
This page cannot be seen from the preview
Don't miss anything!
1
1
Amit Kumar Shweta Agrawal
3 Trees A rooted tree data structure stores information in nodes
5 To store hierarchy of people
6 To store organization of departments 6
8 To organize file-systems Unix file system
9 Markup elements in a webpage 9
11 Terminology All nodes will have zero or more child nodes or children
12 Terminology The degree of a node is defined as the number of its children: deg(I) = 3 Nodes with the same parent are siblings
14 Terminology Nodes with degree zero are also called leaf nodes All other nodes are said to be internal nodes , that is, they are internal to the tree
15 Terminology Leaf nodes:
17 Terminology These trees are equal if the order of the children is ignored ( Unordered tree s ) They are different if order is relevant ( ordered trees )
18 Terminology The shape of a rooted tree gives a natural flow from the root node , or just root
20 Terminology Paths of length 10 (11 nodes) and 4 (5 nodes) Start of these paths End of these paths
21 Terminology For each node in a tree, there exists a unique path from the root node to that node The length of this path is the depth of the node, e. g .,