Function to create hash table to check Fibonacci numbers
static void createHash ( int maxElement ) { int prev = 0 , curr = 1 ; fibonacci . add ( prev ) ; fibonacci . add ( curr ) ; while ( curr <= maxElement ) { int temp = curr + prev ; fibonacci . add ( temp ) ; prev = curr ; curr = temp ; } }