Are linked lists considered linear or non-linear data structures?

A linked list is considered both linear and non-linear data structure depending upon the situation.

  • On the basis of data storage, it is considered as a non-linear data structure.
  • On the basis of the access strategy, it is considered as a linear data-structure.

Linked lists are considered linear data structures. In a linked list, each element (node) points to the next element in the sequence, forming a linear arrangement of data. This contrasts with non-linear data structures, such as trees and graphs, where elements may have multiple connections to other elements, creating more complex relationships than a simple linear sequence.