Introduction to Data Structures & Algorithms
REVIEW OF C
PROGRAMMING
LANGUAGE:
C is a general-purpose, imperative computer programming language, supporting
structured programming, lexical variable scope and recursion, while a static type
system prevents many unintended operations. By design, C provides constructs that
map efficiently to typical machine instructions, and therefore it has found lasting use in
applications that had formerly been coded in assembly language, including operating
systems, as well as various application software for computers ranging from
supercomputers to embedded systems. C was originally developed by Dennis Ritchie
between 1969 and 1973 at Bell Labs.C is an imperative procedural language. It was
designed to be compiled using a relatively straightforward compiler, to provide low-level
access to memory, to provide language constructs that map efficiently to machine
instructions, and to require minimal run-time support.
INTRODUCTION:
Computer Science is the study of data, its representation and transformation by
Computer. For every data object, we consider the class of operations to be performed
and then the way to represent the object so that these operations may be efficiently
carried out. We require two techniques for this:
Devise alternative forms of data representation
Analyse the algorithm which operates on the structure.
These are several terms involved above which we need to know carefully before we
proceed. These include data structure, data type and data representation.
, A data type is a term which refers to the kinds of data that variables may hold. With
every programming language there is a set of built-in data types. This means that the
language allows variables to name data of that type and provides a set of operations
which meaningfully manipulates these variables. Some data types are easy to provide
because they are built-i i to the o puter s a hi e la guage i stru tio set, such as integer,
character etc. Other data types require considerably more efficient to implement. In
some languages, these are features which allow one to construct combinations of the
built-in types like stru tures i C .
However, it is necessary to have such mechanism to create the new complex data types
which are not provided by the programming language. The new type also must be
meaningful for manipulations. Such meaningful data types are referred as abstract data
type.
DATA STRUCTURE:
Data Structures are the programmatic way of storing data so that data can be used
efficiently. Almost every enterprise application uses various types of data structures in
one or the other way.
Thus, a data structure is the portion of memory allotted for a model, in which the
required data can be arranged in a proper fashion.: Data Structure is a way of collecting
and organising data in such a way that we can perform operations on these data in an
effective way. Data Structures is about rendering data elements in terms of some
relationship, for better organization and storage. For example, we have data player's
name "Virat" and age 26. Here "Virat" is of String data type and 26 is of integer data
type.
Programming: Programming is the process of taking an algorithm and encoding it into a
notation, a programming language, so that it can be executed by a computer. Although
many programming languages and many different types of computers exist, the
important first step is the need to have the solution. Without an algorithm there can be
no program. Computer science is not the study of programming. Programming,
however, is an important part of what a computer scientist does. Programming is often
the way that we create a representation for our solutions. Therefore, this language
representation and the process of creating it becomes a fundamental part of the
discipline.
CONCEPTS OF DATA AND INFORMATION:
REVIEW OF C
PROGRAMMING
LANGUAGE:
C is a general-purpose, imperative computer programming language, supporting
structured programming, lexical variable scope and recursion, while a static type
system prevents many unintended operations. By design, C provides constructs that
map efficiently to typical machine instructions, and therefore it has found lasting use in
applications that had formerly been coded in assembly language, including operating
systems, as well as various application software for computers ranging from
supercomputers to embedded systems. C was originally developed by Dennis Ritchie
between 1969 and 1973 at Bell Labs.C is an imperative procedural language. It was
designed to be compiled using a relatively straightforward compiler, to provide low-level
access to memory, to provide language constructs that map efficiently to machine
instructions, and to require minimal run-time support.
INTRODUCTION:
Computer Science is the study of data, its representation and transformation by
Computer. For every data object, we consider the class of operations to be performed
and then the way to represent the object so that these operations may be efficiently
carried out. We require two techniques for this:
Devise alternative forms of data representation
Analyse the algorithm which operates on the structure.
These are several terms involved above which we need to know carefully before we
proceed. These include data structure, data type and data representation.
, A data type is a term which refers to the kinds of data that variables may hold. With
every programming language there is a set of built-in data types. This means that the
language allows variables to name data of that type and provides a set of operations
which meaningfully manipulates these variables. Some data types are easy to provide
because they are built-i i to the o puter s a hi e la guage i stru tio set, such as integer,
character etc. Other data types require considerably more efficient to implement. In
some languages, these are features which allow one to construct combinations of the
built-in types like stru tures i C .
However, it is necessary to have such mechanism to create the new complex data types
which are not provided by the programming language. The new type also must be
meaningful for manipulations. Such meaningful data types are referred as abstract data
type.
DATA STRUCTURE:
Data Structures are the programmatic way of storing data so that data can be used
efficiently. Almost every enterprise application uses various types of data structures in
one or the other way.
Thus, a data structure is the portion of memory allotted for a model, in which the
required data can be arranged in a proper fashion.: Data Structure is a way of collecting
and organising data in such a way that we can perform operations on these data in an
effective way. Data Structures is about rendering data elements in terms of some
relationship, for better organization and storage. For example, we have data player's
name "Virat" and age 26. Here "Virat" is of String data type and 26 is of integer data
type.
Programming: Programming is the process of taking an algorithm and encoding it into a
notation, a programming language, so that it can be executed by a computer. Although
many programming languages and many different types of computers exist, the
important first step is the need to have the solution. Without an algorithm there can be
no program. Computer science is not the study of programming. Programming,
however, is an important part of what a computer scientist does. Programming is often
the way that we create a representation for our solutions. Therefore, this language
representation and the process of creating it becomes a fundamental part of the
discipline.
CONCEPTS OF DATA AND INFORMATION: