Redian新闻
>
一到面试题 弱弱求解答
avatar
一到面试题 弱弱求解答# JobHunting - 待字闺中
y*k
1
Consider two time series. Each time series contains price and time. Time is
expressed in number of seconds since market open. Every time when price
changes – there is a new entry into time series. Write a program that
receives two inputs: time series 1 and 2, and calculates another time series
containing the price difference (spread) between the two products at fixed
10 seconds interval.
//Each timeseries in represented as a key-value object, where keys are times
and values are prices.
//We simply take two timeseries key-value objects and return one that has
times in 10 second intervals.
std::map Problem7::getSpreadTimeSeries(std::map
ts1, std::map ts2)
{
//Fill this function
std::map pseudo_answer = std::map();
pseudo_answer.insert(std::pair(1, 4.0));
return pseudo_answer;
}
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。