分治法(divide and conquer algorithm)

divide and conquer algorithm:

  1. split the problem into several sub-problems of the same type

    比如二分搜索,比如汉诺塔( Hanoi(n)=Hanoi(n1)+1

  2. solve independently

  3. combine those solutions

    二分搜索中的合并(所谓合并,更像是取代)
    当前子问题的结果就是上一步大问题的结果;

你可能感兴趣的:(分治法(divide and conquer algorithm))