資料結構›Ch1 演算法基礎
第 36 題/共 57 題
◀ DS 36/57
36. Recursive Function、Time Complexity
#DS-01-036易Recursive FunctionTime Complexity
  1. What is the time complexity of the following algorithm?
int sum (int n) {
    if(n <= 1)
        return 1;
    else
        return sum(n-1) + n;
}
📄 交大111
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch1 演算法基礎
本章題號 · 21–40 / 57