⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page448.html

📁 Data Structures And Algorithms With Object-Oriented Design Patterns In Python (2003) source code and
💻 HTML
字号:
<HTML><HEAD><TITLE>Top-Down Algorithms: Divide-and-Conquer</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html6328" HREF="page449.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6326" HREF="page433.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6320" HREF="page447.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6330" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H1><A NAME="SECTION0014300000000000000000">Top-Down Algorithms: Divide-and-Conquer</A></H1><P>In this section we discuss a top-down algorithmic paradigm called<em>divide and conquer</em><A NAME=32661>&#160;</A><A NAME=33437>&#160;</A>.To solve a given problem,it is subdivided into one or more subproblemseach of which is similar to the given problem.Each of the subproblems is solved independently.Finally, the solutions to the subproblems are combinedin order to obtain the solution to the original problem.<P>Divide-and-conquer algorithms are often implemented using recursion.However, not all recursive methods are divide-and-conquer algorithms.Generally, the subproblems solved by a divide-and-conquer algorithmare <em>non-overlapping</em>.<P><BR> <HR><UL> <LI> <A NAME="tex2html6331" HREF="page449.html#SECTION0014310000000000000000">Example-Binary Search</A><LI> <A NAME="tex2html6332" HREF="page450.html#SECTION0014320000000000000000">Example-Computing Fibonacci Numbers</A><LI> <A NAME="tex2html6333" HREF="page451.html#SECTION0014330000000000000000">Example-Merge Sorting</A><LI> <A NAME="tex2html6334" HREF="page452.html#SECTION0014340000000000000000">Running Time of Divide-and-Conquer Algorithms</A><LI> <A NAME="tex2html6335" HREF="page457.html#SECTION0014350000000000000000">Example-Matrix Multiplication</A></UL><HR><A NAME="tex2html6328" HREF="page449.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html6326" HREF="page433.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html6320" HREF="page447.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html6330" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright &#169; 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a>  All rights reserved.</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -