This Chapter explains the Importance of the analysis of algorithms, their notations, relationships and solving as many Problems as possible.
Let’s discuss about the basic elements of algorithms
For example, in x2+2x, what is x? Or in x5−10x−12=0, what is x?
The quick answer is, “x “ is a Place-holder which Represents data. Similarly, in computer science programming we need something for holding data, and Variables is the way to do that.
in the above example , the variable “x” can take any values such as integral numbers(1, 2), real numbers(0.1,0.2), or just 0 and 1. To solve the equation. we need to relate them to the kind of values they can take, and in computer science Data type is used for this purpose.
A Data type in a programming language is a set of data with predefined values.
A data type reduces the coding effort.
There are two types of Data types:
Once we have data in variables, we need some mechanism for manipulating that data to solve problems.
DATA STRUCTURE is a particular way of storing and organizing data in a computer so that it can be used efficiently.
A data structure is a special format for organizing and storing data.
General data structure types include: