Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Triple Linked List does not exist?

I would like to know why triple linked list does not exist but double linked list exist ?

Unlike double linked list why can't we use another pointer in the code to store another address to point new node ?

like image 709
Gopireddy Devi Avatar asked Aug 31 '25 03:08

Gopireddy Devi


1 Answers

A linked list is a linear data structure. You can go forward (a singly-linked list), or forward and back (a doubly-linked list). There is no third pointer in a one-dimensional data structure because it would be redundant. In which direction would it point?

A binary tree, which also has two pointers per node, is a two-dimensional data structure. The pointers reference the left or right child nodes. It's also common to have a third pointer, which references the parent node.

You can add as many node pointers as you like. For example, there are ternary trees, quadtrees, octrees, and all manner of custom n-dimensional data structures. They're not called lists, though, because list implies a sequential structure.

like image 77
Jim Mischel Avatar answered Sep 04 '25 09:09

Jim Mischel