GRAPHS WITH LOOPS
Sometimes you need to express a process in such a manner that a set of steps repeats.
For example, when washing your car, you rinse, soap down, and then rinse again.
However, you find a dirty spot, an area that the soap didn’t clean the first time. To clean
that spot, you soap it again and rinse it again to verify that the spot is gone.
Unfortunately, it’s a really stubborn spot, so you repeat the process again. In fact, you
repeat the soap and rinse steps until the spot is clean. That’s what a loop does; it creates
a situation in which a set of steps repeats in one of two ways:
Do'stlaringiz bilan baham: |