Introduction to Algorithm and Data Structures | As per SPPU syllabus

#Fundamentals Of Data Structures 

Data:

It is a collection of facts and figures or data is a value or group of values which is in a particular format.

Example: Signals, Images, Video, Audio 

Data Structure:

Data Structure is a way of collection as well as organizing data in such a way that various operations can be performed on it in an effective way.

Need Of Data Structure:

1. Store huge data.

2. Store data in systematic way

3. Better algorithm

4. Static And Dynamic formats.


Types of  Data Structure:






Static And Dynamic Data Structure:

Static Data Structure:

In a static data structure, the size of the structure is fixed. The content of the data structure can be modified but without changing the memory space allocated to it.

Example: Array

Dynamic Data Structure:

In a Dynamic data structure, the size of the structure is not fixed and can be modified during the operations performed on it. 

Example: Linked list

Problem: A problem can be defined as a real-world problem or real-world instance problem for which you need to develop a program or set of instructions. An algorithm is a set of instructions. 

Algorithm:

  • Algorithm: An algorithm is defined as a step-by-step process that will be designed for a problem.
  • An algorithm is a set of commands that must be followed for a computer to perform calculations or other problem-solving operations.
  • According to its formal definition, an algorithm is a finite set of instructions carried out in a specific order to perform a particular task. 
  • It is not the entire program or code; it is simple logic to a problem represented as an informal description in the form of a flowchart or pseudocode.

algorithm characteristics
Fig: Characteristics of an algorithm


Flowchart:

A flowchart is a schematic representation of an algorithm or a stepwise process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. Flowcharts are used in
designing or documenting a process or program



This is the example of algorithm and flowchart in simple manner:

Fig: Algorithm and flowchart
Fig: Algorithm and Flowchart Example


Time complexity:

                 The Time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the input

Space complexity:

                  The Space complexity of an algorithm quantifies the amount of space or memory taken by an algorithm to run as a function of the length of the input.

Comments