Non-linear data structure is a type of data structure in which the data elements are not arranged in a sequential manner. In other words, the elements are not stored in a linear or sequential manner and do not follow a specific order. Non-linear data structures are used when data elements have a hierarchical relationship and there is a need to represent the relationship between the elements.
Some examples of non-linear data structures are:
Trees: Trees are a hierarchical data structure where each node has a parent and zero or more children.
Graphs: Graphs are a collection of nodes and edges that connect them. Graphs can be used to represent complex systems such as social networks, transportation networks, and computer networks.
Heaps: Heaps are a type of binary tree used to implement priority queues.
Non-linear data structures are commonly used in various fields such as computer science, engineering, mathematics, and natural sciences. They allow for efficient representation of complex relationships between data elements, making them an essential tool in various applications.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.