0
10kviews
Explain different types of data structures with examples
1 Answer
0
362views
  1. A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently
  2. Data structure are broadly classified as

     a. Primitive Data Structure
     b. Non-Primitive Data Structure / Derived Data Structure
    

    Classification of Data Structure

  3. Primitive data structures are the basic data structures that can be directly accessed and does not contain any sub-datatype.
  4. Examples of Primitive data structures are

              i.   Integer
              ii.  Character
              iii.  Float and 
              iv.  Pointer
    
  5. Non-Primitive data Structures are derived from one or more primitive data structures.
  6. Examples of Non-primitive data structures are

              i.  Arrays
              ii.  Lists
              iii. Files
    
  7. Lists are further sub divided into Linear and Non Linear Data structure.
  8. Linear Data Structure

              i.  A data structure that maintains a linear relationship between its elements, it is called linear data structure
              ii.  For example, an array,stack and Queue holds the linear relationship between its elements, it is linear data structure
    

    Array

  9. Non-Linear Data Structure

              i.  In case of non-linear data structure, they do not maintain any linear relationship between their elements
              ii. For example tree,graph
    

    enter image description here

Please log in to add an answer.