Feel the beauty of algorithms and programs

Preface

Written at the very beginning, the purpose of organizing this column is, on the one hand, to prepare for the next internship, autumn recruitment, and spring recruitment, on the other hand, to help myself sort out algorithm ideas. Because I have brushed a lot of questions intermittently, but they are all hard solutions. There is no clear problem-solving skill. When encountering difficult questions, I directly CV, which is obviously not good.
This blog will be used as a general chapter to sort out various types of topics~ Encourage with you, I hope everyone who sees the blog can get the sp.

how are you

To put it bluntly, the greedy algorithm is the process of finding a local optimal solution every time , and the final result is the global optimal solution .
Greedy algorithm generally proceeds as follows:
①Establish a mathematical model to describe the problem
②Divide the problem to be solved into several sub-problems
③Solve each sub-problem to obtain the local optimal solution of the
sub-problem A solution to the original problem is
suitable for distribution problems and interval problems

Guess you like

Origin blog.csdn.net/qq_37747189/article/details/115039363