Tag: 选项卡

递归深度 – Java中的制表符和凹痕

我想格式化我的Java程序输出,以便我可以看到递归的“有多深”。 怎么做? 重要的是不要迷失在我的递归树中。 示例输出(用于从0开始计算第n个数字的普通递归函数): This is the first recursive call. Input value: 3. This is the second recursive call. Input value: 2. This is the 3rd recursive call. Input value: 1. Output value : 1. This is again the second recursive call. Input value: 2. Output value : 1 + 1. This is again the […]