代码优化,去除剑指offer10.1题斐波那契数列最后一种解法中fib[2]=2的一行代码
This commit is contained in:
parent
5d79c99864
commit
aa12d4d41a
@ -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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user