Segment Tree Range Query Time Complexity - 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: segment-tree, range-query, time-complexity, algorithms
Problem Description
You are implementing a real-time market data feed aggregator. To efficiently process incoming price updates for a large number of assets, you decide to use a segment tree to store and query price data. You need to frequently calculate the sum of prices for a given range of assets. What is the time complexity of performing a range sum query on a segment tree with $n$ elements, assuming the segment tree has already been constructed?
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.