Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/StudyRust/leetcode_rust
/ Solution
Class
Solution
509-fibonacci-number.rs:5–5 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
3
// 2. 有公式 fib(n) = fib(n-1) + fib(n-2)
4
5
struct Solution;
6
7
impl Solution {
8
pub fn fib(n: i32) -> i32 {
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected