Difficulty: Medium
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: rust, ownership, borrow-checker, compilation
You are building a high-frequency trading engine in Rust. A crucial part of the system involves processing market data stored in vectors. Consider the following scenario: You have a Vec<f64> representing recent price data. You want to calculate the mean price by passing the vector to a function calculate_mean. After calculating the mean, you need to perform further analysis on the original price data vector, such as calculating the volatility. However, the calculate_mean function takes ownership
Practice this medium 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.