- Primitive- It is a set of elements which do not involve any other elements as its sub parts. i.e the types which directly operate on data types.
- Non-primitive data structures- It is a set of derived elements such as array, files etc.
- Linear Data Structures- in which all elements form a sequence or maintain a linear ordering. Every data element has unique successor and unique predecessor.
- Non-Linear Data Structure- are used to represent the data containing hierarchical or network relationship between the elements. Every data element may have more than one predecessor as well as successor.
Example: - Example: -
•Linear List • Graph
•Stack •Tree
•Queue
Characteristics of Data Structures:
Data Structure |
Advantages |
Disadvantages |
Array |
Quick inserts |
Slow search |
Stack |
Last-in, first-out access |
Slow access to other items |
Queue |
First-in, first-out access |
Slow access to other items |
Linked List |
Quick inserts |
Slow search |
Binary Tree |
Quick search |
Deletion algorithm is complex |
Hash Table |
Very fast access if key is known |
Slow deletes |
Graph |
Best models real-world situations |
Some algorithms are slow and very complex |
0 Comments:
Post a Comment