对于这个问题,我这个算法小白可能也无法解释。我在网上搜了一下关于程序员与算法,发现程序员是否必须会算法这篇文章的解释也许还不错
- 确定性:算法的每个步骤都是明确的,对结果的预期也是确定的
- 有穷性:算法必须是由有限个步骤组成的过程,步骤的数量可能是几个,也可能是几百万个,但是必须有一个确定的结束条件。
- 可行性:一般来说,我们期望算法最后得出的是正确的结果,这意味着算法中的每一个步骤都是可行的。只要有一个步骤不可行,算法就是失败的,或者不能被称为某种算法。
- 输入和输出:算法总是要解决特定的问题,问题来源就是算法的输入,期望的结果就是算法的输出。没有输入的算法是没有意义的,没有输出的算法是没有用的。
- 剑指offer
- 牛客网