代码优化,去除剑指offer10.1题斐波那契数列最后一种解法中fib[2]=2的一行代码

This commit is contained in:
Vongkong 2019-04-14 11:44:31 +08:00
parent 5d79c99864
commit aa12d4d41a

View File

@ -107,7 +107,6 @@ public class Solution {
public Solution() {
fib[1] = 1;
fib[2] = 2;
for (int i = 2; i < fib.length; i++)
fib[i] = fib[i - 1] + fib[i - 2];
}