Data Structures and Algorithms : Introduction, Type and Uses
Introduction to Data Structures and Algorithm
Data structures and algorithms are different topics but both are comes together because they are interrelated to each-other. To construct and implement any data structure we need efficient algorithm in terms of time and space. So for the proper understanding we need to learn both topic together.
A data structure is a way of storing data in a computer
so that it can be used efficiently.
Simply data structure is a way of storing data in a computer so that it can be used efficiently. Data structure begins from the choice of abstract data type, which is the mathematical model of a data structure that specifies the type of data, operations on data and parameters of the operations. For the organization of mathematical and logical concept, data structure provides a methodology. By selecting proper data structure we also get efficient algorithm.
An algorithm is a set of instruction to be performed.
Algorithm is a finite sequence of instructions, each of which have clear meaning and can be executed with a finite amount of effort in finite time. It is the instruction for operation to the computer of any input values. Time complexity and space complexity are comes together with the selection of algorithm. Best algorithm must be efficient in terms of space and time.
First we define possible operations and information for data structure, then it is implemented using programming language like C, C++ and Python. We need to write a code in such a way that program must be fast and efficient. To write code we need to follow algorithm. Here the selection of algorithm becomes challenging part to us. In this way for a complete program we need efficient algorithm and abstract data type of the data structure. Here data structures and algorithms are related.
Collection of data elements with function to store, retrieve
and manipulate data element.
A data structure is a specialized format for organizing and storing data. General data structure includes array, file, records, table, tree, stack and so on. Any data structure is designed to organized data to suit a specific purpose so that it can be accessed and work within appropriate ways.
Types of Data Structures:
We see data structures are highly beneficial because they allow the most basic pieces of computer software to function correctly. It can be classified into following ways:
Simple data structure can be constructed with the help of primitive data structure. It is used to represent the standard data types of any one of the computer languages. Example int, char, double, variables etc.
Compound data structure can be constructed with the help of any one of the primitive data structure and it have a specific functionality. It can be designed by user. It can be classified as:
- Linear data structure
Collection of nodes which are logically adjacent in which logical adjacency is maintained by pointers. Example Stack, Queue, Tables, Lists etc.
- Non-linear data structure
It can be constructed as a collection of randomly distributed set of data items joined together by using a special pointer. Example Tree, Graph etc.
Here are the some operations that can be applied on data structure:
- Add element
- Delete element
- Display element
- Traverse
- Sort the list of element
- Search for a data element
Why data structures?
Ultimate goal of data structure is to write efficient program. In order to do that we need to organize the data in such a way that it can be accessed and manipulated efficiently.
We use data structure because without it, use and storage of data would be impossible. Behind the process of data on a computer system there is always a data structure.
Without data structures we would not have the modern computer of today.
Different types of data structure have different uses. For example documents will have different data structure than spreadsheet.
Some data structures are used for specialized tasks like, B-tree are used for implementation of databases, Networks of machines uses routing tables, graph is used for social networks, to manage browsing history stack is used and so on.
Advantages:
- Data structure allow information to be securely stored on a computer system.
- Most data structure require only a small proportion of a computer's memory capacity.
- storing data is convenient and allows it to be accessed at any time.
- Data structure provides us with the capacity to use and process our data on a software system.
- Make all process very quickly.

Comments
Post a Comment