Saturday, April 14, 2018

PYTHON - NODES

PYTHON - NODES


There are situations when the allocation of memory to store the data cannot be in a continuous block of memory. 
So we take help of pointers where the along with the data, the address of the next location of data element is also stored. 
So we know the address of the next data element from the values of current data element. 
In general such structures are known as pointers. But in Python we refer them as Nodes.

Nodes are the foundations on which various other data structures linked lists and trees can be handled in python.