Skip to content

Instantly share code, notes, and snippets.

@rahulaga
Last active August 29, 2015 13:57
Show Gist options
  • Save rahulaga/9542018 to your computer and use it in GitHub Desktop.
Save rahulaga/9542018 to your computer and use it in GitHub Desktop.
Fibonacci series
public static int fib(int n) {
if (n == 0)
return 1;
if (n == 1)
return 1;
return fib(n - 1) + fib(n - 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment