算法设计与分析基础第三版PPTch 03.pptVIP

  • 2
  • 0
  • 约9.85千字
  • 约 28页
  • 2019-11-09 发布于广东
  • 举报
Design and Analysis of Algorithms - Chapter 3 Brute Force A straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved Examples: Computing an (a 0, n a nonnegative integer) Computing n! Multiplying two matrices Searching for a key of a given value in a list Brute-Force Sorting Algorithm Selection Sort Scan the array to find its smallest element and swap it with the first element. Then, starting with the second element, scan the elements to the right of it to find the smallest among them and swap it with the second elements. G

文档评论(0)

1亿VIP精品文档

相关文档