Introductions to Data Structure and Algorithms


What are Data Structures

Data is a collection of number of Alphabates, Digits and Special symbols.

When we combine such type of data together, it represents an information. Computer takes input in the form of row data, process it and gives predefined data as a output.

Classification of data Structures

Data Structure is divided into 2 categories :

  • Primitive Data Structure
  • Non-primitive Data Structure

  • Primitive Data Structure
The objects of primitive data type can be operated by machine level instruction.
Ex. char, int, float, pointer.
 
  • Non-Primitive Data Structure
These are the data structures created from primitive data structures.
Ex. array, structure, file, union, list.
This Image shows the classification of data structures.
If in some case image not appearing, you can download the word doc which represent the classification.
Classification of data structures

Operations on Data Structure

We can perform various different operations on data structure.

  1. Searching : To find the location/position of a specific data from the given data structure.
  2. Insertion : To insert the new data in the old data structure.
  3. Deletion : To remove existing data from the data structure.
  4. Sorting : Arranging the data in some logical order .
  5. Traversing : To access each data only once.
  6. Merging : It means, combine two similar data structures together.

Algorithm

An algorithm is a finite set of instructions to solve any specific problem. These steps are performed on a data representing instance of problem.
Every algorithm gets a input and gives required output by performing sequence of operations on it.

Every algorithm has various properties such as :

  1. Input: Accept one or more input data.
  2. Output: Give desired one or more result.
  3. Finiteness: Every algorithm must terminate after finite number of steps.
  4. Definiteness: Each step should be clear and unambigous (non repeating).
  5. Effectiveness: Each step of algorithm should be written using basic instructions.

There are two different methods for designing an algorithm :

  1. Top-down approch : It is based ion decomposing a large problem into sub-problems and repeat this process till output is not generated.
    Ex. C language.
  2. Bottom-up approch : It is opposite to top-down, means different parts of problems are solved firstly using a programming language and then these parts are combine into complex problem.
    Ex. C++.

Comments

Popular posts from this blog

Searching Algorithms in Data Structure

Sorting Algorithms in Data Structure

Circular Linked List