© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
M. IndenPython Challengeshttps://doi.org/10.1007/978-1-4842-7398-2_8

8. Binary Trees

Michael Inden1  
(1)
Zurich, Switzerland
 

While Python provides list, sets, and dictionaries as a rich variety of real-world data structures, it unfortunately does not include trees for direct use. However, they are helpful for various use cases and therefore desirable. Because the topic of trees is quite extensive and not to go beyond the scope of this book, I will deal mainly with binary trees and binary search trees as special cases.

Before you look at trees in more detail, I would like to mention some fields of usage:
  • A file system is hierarchically structured and can be modeled ...

Get Python Challenges: 100 Proven Programming Tasks Designed to Prepare You for Anything now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.