Basic Concepts of Data Structures

 Basic Concepts of Data Structures

Data Structure-A data structure is a way of storing data in a computer so that it can be used efficiently and it will allow the most efficient algorithm to be used.

In other words it is an arrangement of data in computer ‘s memory in such a way that it could make the data quickly available to the processor for required calculations.Data structure is about rendering data elements in terms of some relationship,for better organization and storage.

It should be designed and implemented in such a way that it reduces the complexity and increases the efficiency.

Data structure mainly specifies(or dictates) the following 4 things:

i. Organization of data

ii. Accessing methods

iii. Degree of associativity

iv. Processing alternatives for information

Note-The functional definition of a data structure is known as ADT(Abstract Data Type) which is independent of implementation.

Program= Algorithm+ Data Structure

A data structure should be seen as a logical concept that must address two fundamental concerns:

· How the data will be stored

· What operations will be performed on it.

Classification of data structures-Data structure can be classified as-

1. Simple Data Structure

2. Linear Data Structure

3. Compound Data Structures

4. Non-linear Data Structures

Simple Data Structure-It can be constructed with the help of primitive data structure.A primitive data structure used to represent the standard data types of any one of the computer languages.Variables,Arrays,Pointers,Structures,Unions comes under this data structure.

Note-Primitive Data Structure are basic structures and are directly operated upon by the machine instructions.In general,the primitive data structure have different representations on different computers.

Compound Data Structure-It can be constructed with the help of any one of the primitive data structure and it is having a specific functionality.It can be designed by user.It can be classified as-

i. Linear Data Structure-It can be constructed as a continuous arrangement of data elements in the memory.It can be constructed by using array data type.In the linear data structures the relationship of adjacency is maintained between the data elements.Stacks,Queue,Tables,List and Linked list comes under this data structure.

Operations applied on linear data structure-There are following operations-

· Add an element

· Delete an element

· Traverse

· Sort the list of elements

· Search for a data element

ii. Non-Linear data structure-It can be constructed as a collection of randomly distributed set of data item joined together by using a special pointer(tag).In non linear data structure the relationship of adjacency is not maintained between the data items.Tree,Decision Tree,Graph and Forest comes under this data structure.

Operations Applied on non-linear data structure-There are following operations-

· Add elements

· Delete elements

· Display the elements

· Sort the list of elements

· Search for a data element

iii. Non-Primitive data structure-These are derived from the primitive data structures.The non-primitive data structures emphasize on structuring of a group of homogeneous or heterogeneous data items.

Arrays,Lists and Files comes under this data structure.

Commonly Used Operations On Data Structure-There are following 4 commonly used operations on data structure-

a) CREATE-This operation results in reserving memory for the program elements.This can be done by declaration statement.

b) DESTROY/DELETE-This operation destroys the memory space allocated for the specified data structure.

c) SELECTION-This operation deals with accessing a particular data within a data structure.

d) UPDATE-It updates or modifies the data in the data structure.

Other Operations-There are following other operations-

1. SEARCHING-This operation finds the presence of the desired data item in the list of data item.

2. SORTING-In this operation all data items in data structure in a particular order.

3. MERGING-It is a process of combining the data items of two different sorted lists into a single.

Article by –Rajat Ranjan Pratap Singh(Cyber Geek)

Comments