Skip to Content
Hands-On Data Structures and Algorithms with Python - Third Edition
book

Hands-On Data Structures and Algorithms with Python - Third Edition

by Dr. Basant Agarwal
July 2022
Intermediate to advanced
496 pages
11h 18m
English
Packt Publishing
Content preview from Hands-On Data Structures and Algorithms with Python - Third Edition

6

Trees

A tree is a hierarchical form of data structure. Data structures such as lists, queues, and stacks are linear in that the items are stored in a sequential way. However, a tree is a non-linear data structure, as there is a parent-child relationship between the items. The top of the tree’s data structure is known as a root node. This is the ancestor of all other nodes in the tree.

Tree data structures are very important, owing to their use in various applications, such as parsing expressions, efficient searches, and priority queues. Certain document types, such as XML and HTML, can also be represented in a tree.

In this chapter, we will cover the following topics:

  • Terms and definitions of trees
  • Binary trees and binary search trees
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

Hands-On Data Structures and Algorithms with Python - Second Edition

Hands-On Data Structures and Algorithms with Python - Second Edition

Dr. Basant Agarwal, Benjamin Baka, David Julian
Data Structures and Algorithms in Python

Data Structures and Algorithms in Python

Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
Data Structures & Algorithms in Python

Data Structures & Algorithms in Python

John Canning, Alan Broder, Robert Lafore

Publisher Resources

ISBN: 9781801073448Supplemental Content