| 3 | int MEMO[100] = { 0 }; |
| 4 | |
| 5 | size_t fib_cache_result_c(size_t n) |
| 6 | { |
| 7 | if (0 == n) return 0; |
| 8 | if (1 == n || 2 == n) return 1; |
| 9 | if (0 != MEMO[n]) return MEMO[n]; |
| 10 | MEMO[n] = fib_cache_result_c(n - 1) + fib_cache_result_c(n - 2); |
| 11 | return MEMO[n]; |
| 12 | } |
| 13 | |
| 14 | size_t fib_classic_iteration_for_c(size_t n) |
| 15 | { |
nothing calls this directly
no outgoing calls
no test coverage detected