C++ Compile-Time Fibonacci Cost - Quant Trader Interview Question
Difficulty: Hard
Category: Code Analysis
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: C++, template metaprogramming, compile-time, recursion, Fibonacci
Problem Description
Consider the following C++ template metaprogram for calculating the Fibonacci sequence at compile time:
What is the primary cost associated with using this recursive template metaprogram to compute Fibonacci numbers at compile time for relatively large values of n?
Practice this hard trader interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.