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