Lecture 7 Flashcards
(1 cards)
1
Q
Algorithm Design:
- What is algorithm?
- Why is algorithm design important?
- How to design an algorithm?
A
- ~a step by step procedure, every program is essentially a step by step procedure, algorithm is designing your program
- ~fixing an algorithm is easier than fixing code, same reason why you make blueprints for a house before building it
- ~start from the top & then go down; top down approach, •be generic, •fill in the details after all the major steps are laid out, • break the problem into smaller pieces, •tackle smaller pieces individually
~ start from the bottom & then go up; bottom up approach, •start with a particular functionality, •code first and test code often, •add new functionality & code into existing code, •grow the program to include more pieces & capabilities