Defining a node in binary tree


The array implementation of a binary tree is based on individual nodes making up the entire tree. These individual nodes, however, don't have left and right sections to hold references like nodes in a linked list. As we will see later in the course, the array implementation of a tree relies on simple math and the properties of a full binary tree to figure out the left and right child of a node.

Structure of a node

In the array implementation, the data stored in the node is the node itself. It does not need left and right sections, as moving around in the array implementation of a binary tree is accomplished using simple math, as we will learn later.

Liking the course? Check our discounted plans to continue learning.