Data Structures can be broadly divided into two categories:
<> Linear: In this, all the elements are stored sequentially, and retrieval takes place linearly. The arrangement is non-hierarchical, and each element has one successor and one predecessor. Example – Arrays, Linked Lists, Stacks, Queues, etc.
<> Non-linear: Here, the storage does not happen in a linear sequence – i.e., all elements don’t necessarily have just one successor and predecessor. Instead, elements in non-linear Data Structures are connected to two or more items in a non-linear manner. Example – Trees, Graphs, Heaps.
Posted Date:- 2021-09-09 21:41:58