单选题

下面程序的时间复杂度为(   )。

int fib(int n) {
	if (n <= 1)
		return 1;
	return fib(n - 1) + fib(n - 2);
}
A

O(2n)

B

C

O(n)

D

O(1)

赣ICP备20007335号-2