Instagram
youtube
Facebook
Twitter

Nodes

Nodes

  • Nodes are the fundamental building blocks of many computer science data structures. They are the base for Linked List, Stacks, queues, and trees more.
  • A Node contains data and links to other nodes and every data structure adds behaviors and features to nodes.
  • If a node has no links, or they are all Null, you have reached the end of the path you were following.
  • In this image below node named node_a has data 5 and links to a node named node_b

A node (node_a) containing a piece of data (the number 5) and a link to another node (node_b)

  • Node linking is usually to a single node because of some data structure. suppose there are 3 nodes named nodes A, B, and C. A has some data and is linked to B similarly B has some data and is linked to C and C has some data however it is not linked to any other node.                                                                                                                                             
  • This looks like A<B<C here if we remove the linking of B to C then B is still linked via A, however, C has no links therefore this node is an orphaned node.