Featured Posts

What do you mean by Data Structure ? Describe different types of Data Structure ?

Q.1. What do you mean by Data Structure ? Describe different types of Data Structure ?
Ans. Data Structure : A data structure is a class of data that can be characterised by its organization and the operations that are defined on it. Hence
Data Structures = Organised data + Allowed operations

In other words, the organised collection of data is called data structure.
Let us now formally define a Data Structure.
     A data structure is a set of values along with the set of operations permitted on them. It is also required to specify the semantics of the operations permitted on the data values, and this is done by using a set of axioms, which describes how these operations work, and therefore a data structure is made of
  • A set of data values
  • A set of functions specifying the operations permitted on the data values.
  • A set of axioms describing how these operations work.
Classification of Data Structure : There are various ways to classify data structure.
  • Primitive and Non-Primitive data structure :  The data structure that are atomic (indivisible) are called primitive. Example are integer, real, boolean and characters. 
            The data structures that are not atomic are called non primitive or composite. Example are records, array and string.
  • Linear and Non-Linear data structure : In a linear data structure, the data items are arranged in a linear sequence. Example is array. 
      In a non-linear data structures, the data items are not in sequence. Example is tree.
  • Homogeneous and Non-Homogeneous data structure : In homogeneous structures, all the elements are of same type. Example is arrays.
      In non-homogeneous structures, the elements may or may not be of the same type. Example is Records.
  • Static and dynamic data structures : Static structures are ones whose size and structures, associated memory location are fixed at compile time.
      Dynamic structures are ones which expand or shrink as required during the program execution and there associate memory location change.

Post a Comment


www.posthatke.com. Powered by Blogger.

Google+ Followers

Copyright © www.posthatke.com | Blogger Templates | Designed By posthatke.com