LSM Tree vs B-Tree for Time Series - Quant Trader Interview Question
Difficulty: Hard
Category: Algorithms & Data Structures
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: LSM tree, B-tree, time series, database, write amplification, data structures
Problem Description
You are designing a database to store high-frequency market data (tick data). The database will primarily be used for writing new data points as they arrive. Reads will be less frequent but still important for backtesting and analysis. You are considering using either a B-tree or an LSM tree (Log-Structured Merge Tree) as the underlying data structure. Given the write-heavy nature of time-series data, why are LSM trees generally preferred over B-trees for this use case?
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.