Data Stuctures and Algorithms
Data Stuctures and Algorithms
and
Algorithms
Introduction
Chapter 1
Reference:
JOHN BULLINARIA
School of Computer Science
University of Birmingham
Birmingham, UK
Version of 27 March 2019
In constructing a house or building, what is first required to make the plan more clear
with your clients?
What do you think is needed for the non-programmers or to the mass users of
computer to better understand this complexity of the program codes and processes?
The technical terms normally used for these three aspects are:
1. Specification.
2. Verification.
3. Performance analysis.
However, for more complicated specifications and/or algorithms, the fact that an
algorithm satisfies its specification may not be obvious at all. In this case, we need to
spend some effort verifying whether the algorithm is indeed correct. In general, testing
on a few inputs can be enough to show that the algorithm is incorrect.
Data structure is a branch of computer science. The study of data structure helps you to
understand how data is organized and how data flow is managed to increase efficiency
of any process or program. Data structure is the structural representation of logical
relationship between data elements. This means that a data structure organizes data
items based on the relationship between the data elements.
Example:
A house can be identified by the house name, location, number of floors
and so on. These structured set of variables depend on each other to
identify the exact house. Similarly, data structure is a structured set of
variables that are linked to each other, which forms the basic component
of a system
Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or phases), and their
inputs/outputs should be clear and must lead to only one meaning.
Input − An algorithm should have 0 or more well-defined inputs.
Output − An algorithm should have 1 or more well-defined outputs and should match the desired output.
Finiteness − Algorithms must terminate after a finite number of steps.
Feasibility − Should be feasible with the available resources.
Independent − An algorithm should have step-by-step directions, which should be independent of any
programming code.
Efficiency: Data structure also needs to be efficient. It should process the data at high
speed without utilizing much of the computer resources such as memory space. In a real
time state, the efficiency of a data structure is an important factor that determines the
success and failure of the process.
Reference: JOHN BULLINARIA - School of Computer Science, University of Birmingham – United Kingdom, 27 March 2019
CLASSIFICATION OF DATA STRUCTURES
PRIMITIVE DATA STRUCTURE and NON-PRIMITIVE DATA STRUCTURE