Contents • Definition • Abstract Data Type • Importance of Data Structure Definition • A data structure is an efficient way of storing and organizing the data elements in the computer memory. • Data means a value or a collection of values. • Structure refers to a method of organizing the data. • The mathematical or logical representation of data in the memory is referred as a data structure. • The objective of a data structure is to store, retrieve, and update the data efficiently. • A data structure can be referred to as a group of elements grouped under one name. • The group of data elements is called members, and they can be of different types. • Data structures are used in almost every program and software system. • Some examples where data structures are used include stacks, queues, arrays, binary trees, linked lists, hash tables, and so forth. • A data structure helps us to understand the relationship of one element to another element and organize it within the memory. Types of Data Structures Primitive and Non-Primitive Data Structures • Primitive data structures are the fundamental data structures or predefined data structures which are supported by a programming language. Examples of primitive data structure types are short, integer, long, float, double, char, pointers, and so forth. • Non-primitive data structures are comparatively more complicated data structures that are created using primitive data structures. Examples of nonprimitive data structures are arrays, files, linked lists, stacks, queues, and so on. Abstract data Type • An abstract data type (ADT) is a popular mathematical model of the data objects which define a data type along with various functions that operate on these objects. • The definition of ADT only refers to the transactions that need to be performed, but not the way these transactions will be implemented. • It does not specify how the data will be organized in memory and what algorithms will be used for the implementation of those operations. • It is called “abstract” because it provides an independent perspective from the implementation. • The process of supplying only the essentials and concealing details is known as abstraction. • ADT may be considered a black box that hides the internal structure and design of the data type. Importance of Data Structure • Handling complexity: Increase in complexities in computer algorithms, the volume of data usage is rising; this can affect the execution of the application and can create remarkable areas of concern like processing speed, data search, and multiple requests. To counter these data structures are used. • Systematic memory use: Systematic application of data structure memory usage can be optimized, e.g., we can use linked list vs. arrays when we are not particular about the data size. When there is no longer use of memory, it can be cleared. • Ability to reuse: Once we have executed a particular data structure, we can reuse it in any distinct position. Implementation of data structures can be assembled into libraries that can be utilized by various clients. • Abstraction: Data structure acts as the foundation of abstract data types; the data structure describes the physical form of Abstract Data Type. In ADT, the set of operations is supposed to be understood, and the data structure provides physicality to them.