Data structures are broadly classified into two types:
Linear data structures: A linear data structure is one in which all the elements of a data structure are arranged in the same order. A linear data structure stores elements in a non-hierarchical manner, with each item having successors and predecessors except the first and last element.
Nonlinear data structures: Nonlinear data structures do not form sequences; instead, each item or element in a nonlinear arrangement is connected to two or more other items. The data elements are not organized in a sequential order.