Design a data structure/algorithm to keep track of instruments, stock exchanges, and trades which supports an addInstrument, addTrade and getAllTradesBetweenTimes(time1, time2) operation.
Sigiloso
Do you have additional information? I was thinking there could be an overarching class called 'market', which has a vector of all trades, and a vector of all exchanges. Each function just modifies the arrays in some way(add, delete, etc.) and to get all trades between two times, we can just do a linear or binary search for the two times and return another vector of the trades. I am implementing all of this in C++. Is this the type of thing that is expected?