What is an algorithm?

  1. Algorithm: Is a set of instructions for solvin a problem step by step
  2. The objetiv from this algorithm is count people, and the objetiv help you to now if this is the thing that can help you for resolv your problem
  3. What is a pseudo code: The pseudocode is the lenguage to expres the algorithm
  4. Definicion of variable:  A variable is a value
  5. Definition of loop: A loop is a sequence of steps that will repeat some number of times
  6. Definition of trdting an algorithm:It describes exactly how we will go about counting
  7. How to make algorithm: We start counting something startyng at zero, then for each one thing in the room we increment N by 1. So in the first trip througt the loop, we uptraid n from zero to 1 on the second trip thought that same loop. And so, by this algorithm end 2
  8. Testing algorithm: They are correct
  9. We test corner cases: Spouse there are 0 persons in the room. We star initializing N to 0, but yet   the N by 1 doesn't esxuecute at all. Since there isn't a person in the room, and so N remains zero
  10. Definition of brach: Branch is the name from a particular pseudo code, for example when they are 3 people in a room, we need to do another way to solve this pseudo code. But this only executes if they is a person that could not pair whit another. For example when they are 3,5,9 27... people in the room. This algorithm can help you to count them.


    Comments

    Popular posts from this blog

    What is an Algorithm?

    jaz