Linear Data Structures
If a data structure organizes the data in sequential order, then that data structure is called a Linear Data Structure.
Example
- Arrays
- List (Linked List)
- Stack
- Queue
Non - Linear Data Structures
If a data structure organizes the data in random order, then that data structure is called as Non-Linear Data Structure.
Example
- Tree
- Graph
- Dictionaries
- Heaps
- Trees, Etc.,
Major Operations
The major or the common operations that can be performed on the data structures are:
- Searching: We can search for any element in a data structure.
- Sorting: We can sort the elements of a data structure either in an ascending or descending order.
- Insertion: We can also insert the new element in a data structure.
- Updation: We can also update the element, i.e., we can replace the element with another element.
- Deletion: We can also perform the delete operation to remove the element from the data structure.
Abstract Data Type
An ADT tells what is to be done and data structure tells how
it is to be done. In other words, we can say that ADT gives us the
blueprint while data structure provides the implementation part.
Advantages of Data structures
The following are the advantages of a data structure:
- Efficiency: If the choice of a data structure for implementing a particular ADT is proper, it makes the program very efficient in terms of time and space.
- Reusability: he data structures provide reusability means that multiple client programs can use the data structure.
- Abstraction: The data structure specified by an ADT also provides the level of abstraction. The client cannot see the internal working of the data structure, so it does not have to worry about the implementation part. The client can only see the interface.
No comments:
Post a Comment