Skip to content

Instantly share code, notes, and snippets.

@deyindra
Created March 5, 2016 18:18
Show Gist options
  • Save deyindra/f66f2451c14c52618ba8 to your computer and use it in GitHub Desktop.
Save deyindra/f66f2451c14c52618ba8 to your computer and use it in GitHub Desktop.
Finding Nth Fibonacci Tail Recursive way
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