Technology

What is Data Structure and Abstract Data Types?

The study of data structure, therefore, involves two complementary goals. The first goal is to identify and develop useful mathematical entities and operations.

The second goal is to determine representations for those abstract entities and to implement the abstract operations. In data structures that exist in c, the array, and structure, we describe the facilities that are available in c for utilizing these structures; these also focus on the abstract definitions of these data structures, and how they can be useful in problem-solving.   

Data may be a single value or it may be a set of values; whether it is a single value or a group of values to be processed must be organized in a particular fashion; this organizing in a particular fashion.

This organization leads to the structuring of data. The data structure is required for organizing the data in a mathematical way to solve the problems in an efficient and effective manner. The data structure is the building block of the program or it is a systematic way of organizing a collection of data in a mathematical structure.

A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked in inappropriate ways.

 To develop a program for an algorithm, we should select an appropriate data structure for that algorithm. Therefore, the algorithm and its associated data structure from a program will be

Algorithm + Data Structure = Program

Abstract Data Types

A useful tool for specifying the logical properties of a data type is the abstract data type or simply known as ADT. A data type is the collection of data values and a set of operations on those values.

In defining an abstract data type as a mathematical concept, we are not concerned with space or time efficiency. Those are implementation problems in the data structures. 

An abstract data type is a data type whose representation is hidden from, and of no concern to the application code. For example, when writing application code, we don’t care how strings are represented; we just declare and manipulate them by using them. There are two types of fundamental data types which are,

  • Primitive data type
  • Nonprimitive data type

Primitive data type

A primitive data type is one that fits the base architecture of the underlying computer such as int, float, and pointer, and all of the variations, thereof such as char, short, long unsigned float, double and etc, are primitive data types.

  • Integer
  • Float
  • Character
  • Pointer

Non primitive data type

A non-primitive data type is something else such as an array structure or class is known as the non-primitive data type.

The data type that is derived from primary data types is known as a non-primitive data type. The non-primitive data types are used to store the group of values.

  • Array
  • List
  • Linear List
  • Stack
  • Queue
  • Non-linear list
  • Trees
  • Graphs
  • File
  • Rational Number

A rational number is any number that can be expressed as the quotient of two integers. 1/2, 3/4, 2,/3, and 2 are 2/1, which are all rational numbers.    Where sqr(2) and pie are not rational numbers.

A computer usually represents a rational number by its decimal approximation.    methods of defining rational numbers, 

struct rational {

int n;
int d;

}
typedef struct {

int n;
int d;

} RATIONAL;

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

waterfall model
Technology

Advantages and Disadvantages of Waterfall Model

Waterfall Model is one of the major and crucial system development models which was developed for System development. This is
Cloud Computing
Technology

What is Cloud Computing? Benefits and Characteristics

Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management