




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































UNIT - I INTRODUCTION OF ALGORITHMS, ANALYSING ALGORITHMS
UNIT I Introduction: Introduction of Algorithms, Analysing Algorithms. Arrays: Sparse Matrices
INTRODUCTION Data Structure Introduction: ➢ Data Structure is a way to store and organize data so that it can be used efficiently. ➢ Data Structure includes all topics of Data Structure such as Array, Pointer, Structure, Linked List, Stack, Queue, Graph, Searching, Sorting, Programs, etc. ➢ Data structures are the building blocks of any program or the software.
INTRODUCTION OF ALGORITHM Algorithm An algorithm is a procedure having well defined steps for solving a particular problem. Algorithm is finite set of logic or instructions, written in order for accomplish the certain predefined task. It is not the complete program or code, it is just a solution (logic) of a problem, which can be represented either as an informal description using a Flowchart or Pseudo code.
THE PERFORMANCE OF ALGORITHM IS MEASURED ON THE BASIS OF FOLLOWING PROPERTIES: Time complexity: It is a way of representing the amount of time needed by a program to run to the completion. Space complexity: It is the amount of memory space required by an algorithm, during a course of its execution. Space complexity is required in situations when limited memory is available and for the multi user system.
Specification: Description of the computational procedure. Pre-conditions: The condition(s) on input. Body of the Algorithm: A sequence of clear and unambiguous instructions Post-conditions: The condition(s) on output.
1.Requirements 2.Design a. Top Down Approach b. Bottom Up Approach 3.Analysis 4.Refinement and coding 5.Verification a. Program proving b. Testing c. Debugging HOW TO CREATE PROGRAMS 5 PHASES
procedure SORT ( A,n ) 1 for i← 1 to n d 2 j ← i 3 for k ← j + 1 to n do 4 if A(k) < A(j) then j ← k 5 end 6 t ← A(i); A(i) ← A(j); A(j) ← t 7 end 8 end SORT procedure SORT
🞂 Subroutines should be created in order to perform logical sub functions. 🞂 The coding that is done in the project should be in readable form.
.
. for i ← to n do for I ← 1 to n do for j ← 1 to n do . x← x+1 x← x+1 x← x+ end end . end . (a) (b) (c) Three simple programs for frequency counting