给定如下代码,其时间复杂度为( )。
int cellRecur(int n) {
if (n == 1)
return 1;
return cellRecur(n - 1) + cellRecur(n - 1) + 1;
}
O(n^2)
O(2^n)
O(1)
O(n)