Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/austingebauer/go-leetcode
/ fib
Function
fib
fibonacci_number_509/solution.go:3–9 ·
view source on GitHub ↗
(N int)
Source
from the content-addressed store, hash-verified
1
package
fibonacci_number_509
2
3
func
fib(N int) int {
4
if
N < 2 {
5
return
N
6
}
7
8
return
fib(N-1) + fib(N-2)
9
}
Callers
1
Test_fib
Function · 0.85
Calls
no outgoing calls
Tested by
1
Test_fib
Function · 0.68