算法

在这里插入图片描述
算法(Algorithm)是指解题方案的准确而完整的描述,是一系列解决问题的清晰指令,算法代表着用系统的方法描述解决问题的策略机制。也就是说,能够对一定规范的输入,在有限时间内获得所要求的输出。如果一个算法有缺陷,或不适合于某个问题,执行这个算法将不会解决这个问题。不同的算法可能用不同的时间、空间或效率来完成同样的任务。一个算法的优劣可以用空间复杂度与时间复杂度来衡量。

特征

一个算法应该具有以下五个重要的特征:
有穷性

(Finiteness)
算法的有穷性是指算法必须能在执行有限个步骤之后终止;
确切性

(Definiteness)
算法的每一步骤必须有确切的定义;
输入项

(Input)
一个算法有0个或多个输入,以刻画运算对象的初始情况,所谓0个输入是指算法本身定出了初始条件;
输出项

(Output)
一个算法有一个或多个输出,以反映对输入数据加工后的结果。没有输出的算法是毫无意义的;
可行性

(Effectiveness)
算法中执行的任何计算步骤都是可以被分解为基本的可执行的操作步,即每个计算步都可以在有限时间内完成(也称之为有效性)。

U2FsdGVkX18yZYLlR/+ugbRSkAMi9XRcZqb0j+CXmStqfwbQDi6khHX595QeJ8dB
tKK/izr+WSh8qSPeuyasgGoK4frIOzzduS+tvxNRqlTLgB8+yMRVL/8RsjArpTLM
zOZ0/zhD+UxX3AeD2Z5Qv1vEzaq4kUMa97r62aPX+4cJC1smSCoO3wbegSl/emy6
xjHXlgl8dXVHNh4Jls2hs2B4ljSRjG9eGcsg8szp2/iYyP9odq1EcgTngXT1SA6K
91lyh0HCjXcwqwv6Sex+3WIFng3zLytnCCBjMMCZU2vSQ5Hpr3GqrWIwproL3o2O
AufS9LIt4knvfb6lWtaqe/2FzvYF0JJdiU6UvHnEjNjPF4Z0kG4YnozWH1q3DjZp
SdRstMFAIbf33RzPU22lfYLB/yfJswEpjjOstVzM+ESdHmqQfGFJ9PWqFLp6k3AF
KhpiDxDGM7WmH+iQQSbDButCEEf9vQLR7r5jgj7cnwegK+JUozt9CK68di7zt2WD
ZaGhimJw+BLj0ABydQtnKtHy8amAO3l4zl54zPkSrbWRnZNYD1UHAfef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