






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
notes - Algorithm related desciptions
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







Outline the problem and its requirements Design steps (algorithm) to solve the problem
Implement the algorithm in code Verify that the algorithm works
Use and modify the program if the problem domain changes
What is an algorithm?
Which kind of hardware it is running on Which programming language it is written in
Describing the set of instances (input) it must work on Describing the desired properties of the output
What is an algorithm? (Cont’d)
Ordered set of steps: structure! Executable steps: doable! Unambiguous steps: follow the directions! Terminating: must have an end!
always returns the desired output for all legal instances of the problem.
Can be measured in terms of (^) Time (^) Space Time tends to be more important
Formulas: F = (9/5)C + 32 Words: Multiply the Celsius by 9/5 and add 32. Flow Charts. Pseudo-code.
Pseudocode
Based on selection (if, switch) and iteration (while, repeat) constructs in high-level programming languages
Independent of actual programming language