课程简介 Course Introduction
Although there is no universally agreed-on wording to describe this notion, there is general agreement about what the concept means:
An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time.

We can consider algorithms to be procedural solutions to problems.

An input to an algorithm specifies an instance of the problem the algorithm solves. It is very important to specify exactly the set of instances the algorithm needs to handle. (As an example, recall the variations in the set of instances for the three greatest common divisor algorithms discussed in the previous section.) If you fail to do this, your algorithm may work correctly for a majority of inputs but crash on some “boundary” value. Remember that a correct algorithm is not one that works most of the time, but one that works correctly for all legitimate inputs.
留言板 Message Board
条留言  共

  • 参与互动
    Interaction

  • 扫码加入课程
    Scan QR Code
教学队伍Teaching Members
需要验证您的身份,请输入请求信息:
  • 学号号:
  • 班级选择:
  • 课程密码:

扫一扫二维码,快速加入本课程!

放大二维码 查看使用方法
课程
引导