Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Python Data Structures: Trees

via LinkedIn Learning

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn about binary search trees in Python and how to create, navigate, modify, and use them in a real-world context.

Syllabus

Introduction
  • Getting started with trees
  • What you should know
  • BSTs and other trees
1. Navigating Trees
  • Building a basic tree
  • Searching a tree
  • Traversing a tree
  • Getting the maximum height of a tree
  • Getting all nodes at a particular depth
  • Challenge: Printing a tree
  • Solution: Printing a tree
2. Modifying Trees
  • Adding nodes
  • Deleting nodes: Theory
  • Deleting nodes: Code
  • Detecting unbalanced trees
  • Challenge: Adding a balance indicator to the printed tree
  • Solution: Adding a balance indicator to the printed tree
3. Rebalancing Trees
  • Introduction to rotations
  • Rotating trees in Python
  • Fixing a tree with multiple points of imbalance
  • Challenge: Smarter automated rebalancing
  • Solution: Smarter automated rebalancing
Conclusion
  • Next steps with data structures

Taught by

Ryan Mitchell

Reviews

4.7 rating at LinkedIn Learning based on 181 ratings

Start your review of Python Data Structures: Trees

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.