Lecture 7 Flashcards

(1 cards)

1
Q

Algorithm Design:

  1. What is algorithm?
  2. Why is algorithm design important?
  3. How to design an algorithm?
A
  1. ~a step by step procedure, every program is essentially a step by step procedure, algorithm is designing your program
  2. ~fixing an algorithm is easier than fixing code, same reason why you make blueprints for a house before building it
  3. ~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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly