Skip to Content
C# Data Structures and Algorithms
book

C# Data Structures and Algorithms

by Marcin Jamro
April 2018
Intermediate to advanced content levelIntermediate to advanced
292 pages
6h 44m
English
Packt Publishing
Content preview from C# Data Structures and Algorithms

Example – company structure

In the previous example, you saw how to use integer values as data for each node in a tree. However, it is also possible to store instances of user-defined classes in nodes. In this example, you will see how to create a tree presenting the structure of a company, divided into three main departments: development, research, and sales.

Within each department there can be another structure, such as in the case of the development team. Here, John Smith is Head of Development. He is a boss for Chris Morris, who is a manager for two junior developers, Eric Green and Ashley Lopez. The latter is also a supervisor of Emily Young, who is a Developer Intern.

An example tree is shown in the following diagram:

As you can see, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Data Structures and Algorithms in C#

Beginning Data Structures and Algorithms in C#

Marcin Jamro

Publisher Resources

ISBN: 9781788833738Supplemental Content