15. 與迴圈(Loop)相比,下列哪一個不是使用遞迴(Recursive)的優點?
(A)程式可讀性高
(B)程式執行效率較高
(C)區域變數與暫存變數較少
(D)程式碼較短

答案:登入後查看
統計: A(132), B(916), C(171), D(97), E(0) #1914577

詳解 (共 5 筆)

#3517504
for迴圈 VS 遞迴 所謂for迴圈...
(共 221 字,隱藏中)
前往觀看
27
1
#3681216
遞迴優點:1.程式簡潔明確    2.減...
(共 85 字,隱藏中)
前往觀看
10
2
#6198484


(共 1 字,隱藏中)
前往觀看
10
1
#5912016
遞迴方式設計程式較簡易且容易了解。 但遞迴方式也是有它的缺 點,最大的缺點就在於,以遞迴方式執行時,會占用較多記憶體空間和 花費較多的CPU時間
7
0
#4596605

PROS:

Recursion can reduce time complexity.

Recursion adds clarity and reduces the time needed to write and debug code.

Recursion is better at tree traversal.


CONS:

Recursion uses more memory.

Recursion can be slow.

0
2

私人筆記 (共 1 筆)

私人筆記#5195445
未解鎖
  遞迴  優點1.程式簡潔明確2.節...
(共 156 字,隱藏中)
前往觀看
0
1