Created
March 5, 2016 18:18
-
-
Save deyindra/f66f2451c14c52618ba8 to your computer and use it in GitHub Desktop.
Finding Nth Fibonacci Tail Recursive way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int tailRecursiveFibonacii(int n, int end, int start){ | |
return n==1 ? start :tailRecursiveFibonacii(n-1,end+start,end); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment