Dynamic Programming Issue - Fibonacci Sequence
问题 I was reading this Wikipedia article, and attempting to implement a 'map' based solution in C, where a 'map' is just an int array, initialized to 0. For some reason it works up to fib(93) , then starts outputting strange numbers. If it matter's I'm specifying -std=c99 : #include <stdio.h> #include <stdlib.h> // represents a fib num typedef unsigned long long fib_t; // the default value of our 'map' const int FIB_NULL = 0; // could get from input, set here for now const int FIB_MAX = 100; //