Is this tail recursion?
问题 I have tried to find examples of tail recursion and I really don't see the difference between regular and tail. If this isn't tail recursion, can someone tell me why its not? public static long fib(long index) { // assume index >= 0 if (index == 0) // Base case return 0; else if (index == 1) // Base case return 1; else // Reduction and recursive calls return fib(index - 1) + fib(index - 2); } // end of method fib(long index) 回答1: No, the method in the question does not use a tail recursion. A