6.4. ImplementationΒΆ

Keeping in mind the definitions from the previous section, we can use the following functions to create and manipulate a binary tree:

The key decision in implementing a tree is choosing a good internal storage technique. Python allows us two very interesting possibilities, and we will examine both before choosing one. We call them list of lists and nodes and references.

You have attempted of activities on this page