程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

[Python implementation of Huawei machine test] first understanding of dynamic planning

編輯:Python

List of articles

  • Preface
  • Dynamic programming routines
  • BM62 Fibonacci sequence
    • 1. Recursive violence solving
    • 2. Recursive solution of subproblem optimization
  • Time consuming comparison


Preface

《 Huawei machine test real problem 》 The column includes Huawei column of niuke.com 、 Huawei test questions 、 Huawei OD Real problem of machine test .

If you are preparing for Huawei's interview , If you want to know something, you can send me a private letter , I will try my best to help you , I can also give you some suggestions !

This paper solves the non optimal solution ( Non optimal performance ).

Dynamic programming routines

Dynamic programming (Dynamic Programming,DP) It's a branch of operations research , It is the process of solving the optimization of decision-making process .

There are many problems in dynamic planning , such as : The longest increasing subsequence problem 、 Shortest path problem 、 knapsack problem 、 Resource allocation, etc .

Dynamic planning is not everything , Problems applicable to dynamic programming must meet Optimal substructure and No aftereffect .

  • Optimal substructure : The dynamic programming problem must have the optimal substructure , From the best value of the subproblem to the best value of the original problem .
  • No aftereffect : After arranging the stages in a certain order , For a given state , The state of its previous stages cannot directly affect its future decisions , And only through the current state ࿰

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved