學習遞歸算法引起的思考

最近突然想研究下遞歸算法到底是什麼運行的,於是寫了一下這段代碼,debug了不下十次: 1 public static void main(String[] args) { 2 sum(4); 3 } 4 5 public static int sum(int n) { 6 if (n == 1) { 7 re
相關文章
相關標籤/搜索