What is Data Structure and Abstract Data Types?

data structure and algorithm

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

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

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

This organization leads to the structuring of data. The data structure is required for organizing the data in a mathematically 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 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. Anydata structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

 To develop a program of an algorithm, we should select an appropriate data structure for that algorithm. Therefore algorithm and it’s 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 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 data structure. 

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. There are two types of fundamental data types which are,

  • Primitive data type
  • Non primitive 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 type.

  1. Integer
  2. Float
  3. Character
  4. 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.

  1. Array
  2. List
    1. Linear List 
      1. Stack
      2. Queue
    2. Non-linear list
      1. Trees
      2. Graphs 
  3. File

Rational Number

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

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

struct rational {

int n;
int d;

}
typedef struct {

  int n;
  int d;

} RATIONAL;

TutsMaster.org

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