blog 13 | greedy algorithms work summary

Chapter IV greedy algorithm summary

First, the understanding of the greedy algorithm:

Greedy algorithm only concerned about the current state of each decision made before the results are not will have an impact, and did not all problems can be the optimal solution with the greedy algorithm.

Select the greedy strategy must have no after-effect, the result that is currently selected must not affect the results of the previous state, but only with the current status.

 

Second, please describe the nature of vehicle refueling greedy selection problem:

Every time whether the car moving forward, depending on the current amount of oil, enough fuel to travel, not enough to refuel, refueling times before at this time of the solution of the current problems need to consider.

 

Third, please explain the situation encountered in the learning process in this chapter and the issue of pair programming:

1, for the greedy choice proved feasible to spend a certain amount of effort.

2, pair programming in unison, and quickly see the exercise of my ability to interpret others code.

First, the understanding of the greedy algorithm:

Greedy algorithm only concerned about the current state of each decision made before the results are not will have an impact, and did not all problems can be the optimal solution with the greedy algorithm.

Select the greedy strategy must have no after-effect, the result that is currently selected must not affect the results of the previous state, but only with the current status.

 

Second, please describe the nature of vehicle refueling greedy selection problem:

Every time whether the car moving forward, depending on the current amount of oil, enough fuel to travel, not enough to refuel, refueling times before at this time of the solution of the current problems need to consider.

 

Third, please explain the situation encountered in the learning process in this chapter and the issue of pair programming:

1, for the greedy choice proved feasible to spend a certain amount of effort.

2, pair programming in unison, and quickly see the exercise of my ability to interpret others code.

Guess you like

Origin www.cnblogs.com/gzq18/p/11924240.html