Check if current element is a fibonacci number
if ( hash . has ( arr [ i ] ) ) { fibcount ++ ; } else fibcount = 0 ; } for ( let i = 0 ; i < n ; i ++ ) res = Math . max ( res , left [ i ] + right [ i ] ) ; return res ; }