分而治之算法_分而治之算法的含义:举例说明

分而治之算法

什么是分而治之算法? (不,这不是“分而治之”) (What are Divide and Conquer Algorithms? (And no, it's not "Divide and Concur"))

Divide and Conquer is an algorithmic paradigm (sometimes mistakenly called "Divide and Concur" - a funny and apt name), similar to Greedy and Dynamic Programming. A typical Divide and Conquer algorithm solves a problem using the following three steps.

“分而治之”是一种算法范式(有时被错误地称为“ Divide and Concur”(一个有趣且恰当的名称)),类似于“贪婪和动态编程”。 典型的分而治之算法使用以下三个步骤来解决问题。

  1. Divide: Break the given problem into subproblems of same type. This step involves breaking the problem into smaller sub-problems. Sub-problems should represent a part of the original problem. This step generally takes a recursive approach to divide the problem until no sub-problem is further divisible. At this stage, sub-problems become atomic in nature but still represent some part of the actual problem.

    划分 :将给定问题分解为相同类型的子问题。 此步骤涉及将问题分解为较小的子问题。 子问题应该代表原始问题的一部分。 此步骤通常采用递归方法来划分问题,直到没有子问题可以进一步分割为止。 在这个阶段,子问题本质上已成为原子问题,但仍代表实际问题的一部分。

  2. Conquer: Recursively solve these sub-problems. This step receives a lot of smaller sub-problems to be solved. Generally, at this level, the problems are considered &

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值