Data Structure and Algorithm - Types of Data Structure

In real life we deal with variety of data. To store and handle these variety of data various data structure have been introduced. Some are primitive data structures also called System defined data types as it is supported by all computer system. Based on these primitive data structures some well known other data structures has also been derived. Below figure represents the type of data structures.



1. System Defined - Since all computer system are designed to support these types, it is called System defined data types or System defined data structure. These are also called primitive data types as other data structures are derived from these types. Number, Character and String are System defined data structures. 

2. User Defined - These data structures were derived using System defined data structures. Since these data structures are implemented by user using system defined data structures these are called User defined data structures. Mostly these types of data structures are defined to store collection of data.

2.1 Linear Data Structure - If traversal from current element in the data structure is one way or only one option is available to traverse forward or backward, Such type of data structure is called Linear data Structure. 

2.2 Non Linear Data Structure - If more than one option is available while traversing backward or forward from current position, then such type of data structure is called Non Linear Data Structure.

2.1.1 Static Data Structure - If the size of data structure is fixed while defining the data structure then such data structure is called static data structure. Array is an example of Static Data Structure. Once array is defined its size can't be changed.

2.1.2 Dynamic Data Structure - It is just opposite to Static data Structure. Here after defining the data structure size of the data structure can be changed any time based on demand. List, Stack, Queue, LinkedList etc are example of Dynamic Data Structure. These topics will be discussed in detail in incoming blogs.

2.2.1 Tree Data Structure - Here data is stored in nodes and relation between two nodes are represented by edge between nodes. Edges are used to travers from one node to another. Here only one node is present with no incoming edge, which is called root node. All other nodes have one incoming edge and zero or more outgoing edge. nodes having zero outgoing edge are called leaf node.

2.2.2 Graph - Graph data structure is collection of nodes and edges, were data is stored in nodes and relation among nodes are represented by edges. Tree is a special case of graph with some constraint. In upcoming blogs we will cover it in detail.
Previous Post Next Post