Beruflich Dokumente
Kultur Dokumente
to run to completion
• Complex logic: Sometimes, the program logic is quite complicated. In that case,
flowchart becomes complex and clumsy. This will become a pain for the user,
resulting in a waste of time and money trying to correct the problem
• Alterations and Modifications: If alterations are required the flowchart may
require re-drawing completely. This will usually waste valuable time.
• Reproduction: As the flowchart symbols cannot be typed, reproduction of
flowchart becomes a problem.
10. Write the Characteristics of an Algorithm
Unambiguous
Input
Output
Effectiveness
Feasibility
Precision
Independent
natural languages
pseudo code,
flowcharts
drakon-charts
programming languages or
o Reduced complexity.
o Increased flexibility.
o Ease of understanding.
o Easily modified.
o Pseudocode is compact and does not tend to run over many pages.
o Language Independent.
Types of flowchart
Document flowcharts
Data flowcharts
System flowcharts
Program flowchart
The study of algorithms is called algorithmic. It is more than a branch of computer science. It is the core of
computer science and is said to be relevant to most of science, business and technology.
From a practical standpoint, a standard set of algorithms from different areas of computing must be known,
in addition to be able to design them and analyze their efficiencies. From a theoretical standpoint the study of
algorithms is the cornerstone of computer science
24. What is an algorithm design technique?
An algorithm design technique is a general approach to solving problems algorithmically that is applicable
to a variety of problems from different areas of computing.
25. What are the types of algorithm efficiencies? The two types of algorithm efficiencies are Time
efficiency: indicates how fast the algorithm runs Space efficiency: indicates how much extra memory the algorithm
needs
Problem
Algorithm
Input Output
“Computer
27. What are the steps involved in the analysis framework? The various steps are as follows Measuring the
input‘s size Units for measuring running time Orders of growth Worst case, best case and average case
efficiencies
28. . What are the features of efficient algorithm? • Free of ambiguity • Efficient in execution time • Concise
and compact Completeness • Definiteness Finiteness
RECURSION ITERATIONS
Recursive function – is a function that Iterative Instructions –are loop based
is partially defined by itself repetitions of a process
Recursion Uses selection structure Iteration uses repetition structure
Infinite recursion occurs if the An infinite loop occurs with iteration
recursion step does not reduce the if the loop-condition test never
problem in a manner that converges on becomes false
some condition.(base case)
Recursion terminates when a base case Iteration terminates when the loop-
is recognized condition fails
Recursion is usually slower then Iteration does not use stack so it's
iteration due to overhead of faster than recursion
maintaining stack
Recursion uses more memory than Iteration consume less memory
iteration
Infinite recursion can crash the infinite looping uses CPU
system cycles repeatedly
Recursion makes code smaller Iteration makes code longer