当前位置:网站首页>动态规划总结
动态规划总结
2022-07-29 05:24:00 【lalajh】

递归树为 时间复杂度为O(2的n次方)

剪枝操作(优化) 时间复杂度为O(n)
消除冗余计算

实际就是

代码实现

上面的优化,是从F(20)到F(1)和F(0),算出F(1)和F(0)在反推回去算出F(20)
有两个过程,自顶向下和自底向上!
再次优化,消除自顶向下
只有自底向上


可以再次优化,优化空间复杂度

问题

暴力法:


优化-备忘录


再次优化

总结

边栏推荐
猜你喜欢

SimpleFOC+PlatformIO踩坑之路

EPS32+Platform+Arduino 跑马灯

从头安装MYSQL(MYSQL安装文档-解压版)

【软件工程之美 - 专栏笔记】25 | 有哪些方法可以提高开发效率?

【RoboMaster】从零开始控制RM电机(2)-CAN通信原理及电调通信协议

NoClassDefFoundError 处理

倾角传感器用于通信铁塔、高压电塔长期监测

【软件工程之美 - 专栏笔记】28 | 软件工程师的核心竞争力是什么?(下)

【软件工程之美 - 专栏笔记】“一问一答”第2期 | 30个软件开发常见问题解决策略

2022 spring recruit - Hesai technology FPGA technology post (one or two sides, collected from: Digital IC workers and FPGA Explorers)
随机推荐
太原市公交路线爬取
【软件工程之美 - 专栏笔记】21 | 架构设计:普通程序员也能实现复杂系统?
Hal library learning notes-11 I2C
Jingwei Qili: OLED character display based on hmep060 (and Fuxi project establishment demonstration)
Pit avoidance: about the interconnection of two hc-05 master-slave integrated Bluetooth modules, there is no connection problem
LeetCode #35.搜索插入位置
LeetCode #344.反转字符串
LeetCode #14. 最长公共前缀
QT learning notes QtSql
Huawei cloud 14 day Hongmeng device development -day5 drive subsystem development
唯美girls
爬取表情包
NRF52832-QFAA 蓝牙无线芯片
FPGA based: multi-target motion detection (hand-in-hand teaching ①)
网络安全学习篇
简洁代码实现pdf转word文档
From entry to soul: how to use tb6600 single chip microcomputer to control stepping motor with high precision (42/57)
无符号右移
2022 spring move - core technology FPGA post technical aspects (one side experience)
2022暑初二信息竞赛学习成果分享2