Tuesday, July 30, 2013

What is a linear datastructure?

Linear datastructure is one in which the data items are placed in the memory contiguously i.e. one after the other.
Pros
  • If we search the first data item, then it is very easy to find the next data items
Cons
  • Size of the array must be know prior to allocation
  • Requires contiguous memory, however if a free memory space is disjoint then this free memory space is not utilized for memory allocation
Example of linear datastructure is an array.

Reactions:

0 comments:

Post a Comment