What is data structure
Written by
What is a Data Structure?
In a very fundamental term, Data Structure is a data object containing other data as its components. Data Structure can also be termed as a special format to organize the process, access/retrieve and store data.
So, now that we understand that Data Structure is a method of collecting & organizing data in such a way that performing various operations on it is more effective. Data Structures handle large data/information efficiently, especially in databases. Efficient access to the information stored in various forms can help us design better and efficient algorithms.
Arrays, linked lists, stacks, queues, and binary trees are examples of Data Structure.
Main Operations Used in Data Structures is:
- Traversal is an operation where each element of data structure is accessed for information.
- Search is an operation where every single data of data structure is searched for a specific item.
- Insertion with this operation we can add a new entity to the existing record of data structure.
- Deletion with this operation we can delete any entity which is now not needed in the data structure.
- Storing is an operation that stores the data structure elements as it is.
- Merging with the help of this operation we can merge the two different data structures.
Understanding the basic types of data structures:
- An array is a collection of similar data elements and all of the above-mentioned operations can be performed on an array. However, Traversal is the most used kind of operation for array
- Linked List is a data structure that allows dynamic memory allocation and data is stored similarly as in arrays. However, data elements are linked through pointers.
- Queues are data structures where inserting a new entity is possible only at one end, ie, the rear end and deletion is possible at another end, the front end.
- Stacks are data structures where insertion and deletion is possible at only one end, the front end. Insertion of data is called push and deletion is pop.
- Binary Trees are the two-dimensional data structures. Every element of a binary tree has two pointers called the left and the right child. Data in a binary tree are entered randomly but displayed in order.