Trillium Trading Interview Question

Calculus question