Static Polymorphism with CRTP - Quant Developer Interview Question
Difficulty: Hard
Category: memory_optimization
Asked at: Jump Trading, Tower Research, Citadel Securities, Optiver, HRT
Topics: templates, crtp, optimization, cpp17
Problem Description
The Curiously Recurring Template Pattern (CRTP) enables static polymorphism, allowing compilers to inline function calls and eliminate indirect branching instructions while maintaining a modular code structure. This technique is crucial for optimizing execution speed in order processing engines where every nanosecond impacts profitability.
Task
Implement a generic order processing system using the Curiously Recurring Template Pattern (CRTP) to calculate the Volume Weighted Average Price (VWAP)
Practice this hard developer interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.