Page 184 - DCAP407_DATA_STRUCTURE
P. 184
Kamlesh Lakhwani, Lovely Professional University Unit 10: Trees
Unit 10: Trees
CONTENTS
Objectives
Introduction
10.1 Trees
10.1.1 Representation of Tree in Graphs
10.1.2 Types of Graphs
10.2 Types of Trees
10.2.1 Binary Tree
10.2.2 Binary Search Tree
10.2.3 2-3 Trees
10.2.4 Huffman Trees
10.3 Representation of Tree in Memory
10.4 Application of Trees
10.4.1 Expression Trees
10.4.2 Game Trees
10.4.3 Decision Trees
10.5 Summary
10.6 Keywords
10.7 Self Assessment
10.8 Review Questions
10.9 Further Readings
Objectives
After studying this unit, you will be able to:
• Define trees
• Discuss the types of trees
• Explain the representation of tree in memory
• Discuss the application of trees
Introduction
We know that data structure is a set of data elements grouped together under one name. A data
structure can be considered as a set of rules that hold the data together. Almost all computer programs
use data structures. Data structures are an essential part of algorithms. We can use it to manage huge
amount of data in large databases. Some modern programming languages emphasize more on data
structures than algorithms.
There are many data structures that help us to manipulate the data stored in the memory, which we
have discussed in the previous units. These include array, stack, queue, and linked-list.
Choosing the best data structure for a program is a challenging task. Similar tasks may require different
data structures. We derive new data structures for complex tasks using the already existing ones. We
LOVELY PROFESSIONAL UNIVERSITY 177