Data Structure is defined as the way in which data is organized in the memory location. There are 2 types of data structures:
Linear
Data Structure: In linear data
structure all the data are stored linearly or contiguously in the memory. All
the data are saved in continuously memory locations and hence all data elements
are saved in one boundary. A linear data structure is one in which we can reach
directly only one element from another while travelling sequentially. The main
advantage, we find the first element, and then it‟s easy to find the next data
elements. The disadvantage, the size of the array must be known before
allocating the memory. The different types of linear data structures are:
- Array
- Stack
- Queue
- Linked List
Non-Linear
Data Structure: Every data item is
attached to several other data items in a way that is specific for reflecting
relationships. The data items are not arranged in a sequential structure. The
various types of non linear data structures are:
- Trees
- Graphs

No comments:
Post a Comment