Saturday, November 2, 2013

What are the types of Data Structure?


Types Of Data Structure

           A data structure is a method for organizing and storing data, which would allow efficient data retrieval and usage.
            Basically data structures are classified into two categories given below:
                          1. Linear.
                          2. Non linear.


Linear-Definition:

            * Arranged in or extending along a straight or nearly straight line.
               * Resembling the straight line; having only one dimension(length);
                  * progressing from one stage to another in a single series of steps; sequential

Linear Data Structure:

            Linear data structures organize their data elements in a linear fashion, where data elements are attached one after the other.
               * Data elements in a liner data structure are traversed one after the other and only one element can be directly reached while traversing

Linear Data Structure- Array:

 

Linear Data Structure- Linked List:

 

Linear Data Structure- Stack:

 

Linear Data Structure- Queue:

 

Non Linear-Definition:

        Not arranged in a straight line.
                Not sequential or straightforward.

Non Linear Data Structure:

              In nonlinear data structures, data elements are not organized in a sequential fashion.
                 A data item in a nonlinear data structure could be attached to several other data elements to reflect a special relationship among them.
                    All the data items cannot be traversed in a single run.

Non Linear Data Structure- Tree:

 

Non Linear Data Structure- Graph:

 

Reference:

                     www.differencebetween.com
                     www.safaribooksonline.com

Goto Data Structure Concepts

1 comment: