December 2023
Intermediate to advanced
504 pages
11h 43m
English
You were introduced to node-based data structures in the previous chapter with linked lists. In a classic linked list, each node contains a link that connects the node to a single other node. A tree is also a node-based data structure, but within a tree each node can have links to multiple nodes.
Here is a visualization of a simple tree:

In this example, each node has links that lead to two other nodes. For the sake of simplicity, we can represent this tree visually without showing all the memory addresses:

Trees come with their own unique ...
Read now
Unlock full access