NTA UGC NET 2023 » NTA Study Materials » Computer Science » Goals of Data Structure

Goals of Data Structure

Data structure allows storing data while maintaining the data’s correctness and efficiency in a computer program. It optimizes the solution through low space-time complexity.

Data is an essential part of our daily lives. Organizing and storing data is very important. Data is stored in various ways and formats. It can be either a single set of values or multiple values. A data item refers to a single set of values in general. 

For example, the name of an employee can be considered as one data item. It can further be categorized as sub-items namely first name, middle, and last name. The employee id associated with the data item would be a single item. Further, the address can have sub-items such as street and area. Just one employee is likely to have numerous data items and subitems related to it. To store and maintain the correctness and efficiency of data, the concept of data structure comes in. 

Goals of Data Structure 

Data structure stores and organizes a large set of data in computer memory. It ensures the reusability of data efficiently later. Data can be stored logically or mathematically. It can vary depending on the organizational needs and adaptability levels. The data models are adapted based on two factors:

  1. The structure was established to reflect the relation of data with real-world objects.
  2.  Low level of complexity for reusability and robustness.

When a program is built, the best solution has certain parameters;

  1. The correctness of the solution matters.
  2. The efficiency of the solution.
  3. The data structures also need to be efficient.
  4. It must save cost, space, and time in comparison to other solutions.

The right choice of data structure and algorithm can lower the costs and increase the benefits by cutting down space and time complexity. It allows the right access and modifications to data. Data structure defines the relationship between the elements and their correct role in the problem-solution. It brings out the relationship with the real world.

Characteristics of Data structures

  • Data structures can be homogeneous or nonhomogeneous. Homogenous has the same data types of elements represented in the data structure. For example, an array

Non-homogenous might have different data types stored in the data structures.

  • It ensures the robustness of data is maintained
  • Data structure maximises the reusability of data
  • It reduces memory usage during processing
  • The execution time required for each process in the data structure is known as time complexity
  • The space required for each process in the data structure is known as space complexity
  • Data structure maintains the correctness of the data stored and ensures efficiency

Advantages of Data Structures

  1. The right choice of data structure used in a particular problem increases its efficiency and optimises the solution for low space and time complexity.
  2. When a particular data structure is implemented in a program it can be used again in some other part of the program depending on its scope. This increases the reusability and robustness of the data.
  3. It abstracts the data on the various levels and hence confines the interaction of data and user up to interface only.
  4. Data Structure simplifies the process of storing and processing data in software.

Popular data structures and their usage

  • Arrays: Array stores elements with the same data types in contiguous memory locations. Arrays can be one-dimensional or two-dimensional. It is a static and linear data structure. Arrays are generally used for operations like searching or sorting in a system. Every element inside an array has an index value attached to it
  • Linked list: Linked list contains nodes storing data and memory attached to it. The data is stored in a contiguous memory location and hence the address stored in the node links it to the next address where the data is stored
  • Stack: Stack is a linear data structure that allows insertion and deletion through the open end. The insertion operation is known as push while deletion is called pop
  • Queue: Another linear data structure where the operation follows the first in first out rule. Insertion in queues is known as en queue and deletion is known as dequeue
  • Graph: A graph is a non-linear data structure with nodes and edges. It connects other nodes in the graph and forms a graphical image of an object. The graph can be directed or undirected. Directed graphs are connected in a single direction while undirected graphs are bidirectional
  • Trees: Trees are non-linear data structures. It forms hierarchical relations with the data elements. The root node is the point from which the tree descends. A tree might have subtrees. It exhibits the parent-child relationship. The node that descends from a certain node is called a child node. A parent node can have multiple child nodes but only one parent node

 Conclusion 

Data structures allow systematic data storage for robustness and reusability. The correct implementation of data structure facilitates easy computing and manipulation of data as required. In software, there are thousands of programs running in the background and each computer program utilises data structure to improve efficiency with space and time complexity. Its correctness decides the efficiency of the data and code. Data structure along with algorithms is the fundamental block to writing codes for computers. The problem solving makes maximum use of data structure and algorithm during the implementation.

faq

Frequently asked questions

Get answers to the most common queries related to the NTA Examination Preparation.

What are the operations that can be performed on data structures?

Ans : Following operations can be performed on data structure...Read full

Why do we need to use data structures?

Ans : It stores and processes data such that its efficiency, ...Read full

What is the application of data structures?

Ans : Data structures are used during programming. The applic...Read full

What is push operation in a stack?

Ans: Push operation allows the insertion of an element in a stack.