查看: 4480| 回复: 1
跳转到指定楼层
上一主题 下一主题
收起左侧

[找工就业] verition fund management金融公司OA(求大米)

全局:

2019(4-6月)-CS本科+3-5年 | 网上海投|大纽约地区 码农类General全职@

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
冒死贴题,跪求大米他们公司主要写c++,这个oa可以用c++, java, c#写

Sample a TimeSeries
Allotted time:  1.5 HourWe have a TimeSeries class, which is just 2 parallel vectors of 1)time in microseconds since midnight, and 2) values.template class TimeSeries{    std::vector timeUsSinceMid;    std::vector values;}
Your job is to write a "sample()" as a member function for TimeSeries,and return a new TimeSeries.Sample() takes 2 parameters - frequency, and an optional starttime. Frequency is how often you want to sample, in microseconds.  AndstartTime is defined to be when sampling begins. The output timeserieswill conceptually be a series of samples. ..
A sample would be the time ofthis particular sample, plus the value at or before that time in theoriginal time series.
The start time may be before or after timeUsSinceMid[0], or the firsttime in the original time series.
If you don't supply the startTimeargument, it is implied to be equal to the first element of youroriginal time series.
If startTime is set before this timeSeriesstarts, it would fast forward until the first valid startTime.(e.g. if the original timeSeries starts 9:00:01, and we want to samplewith frequency of 30 seconds, with startTime at 9:00:00, then you'dfast forward to first valid startTime, or 9:00:30.) . ----
C++   TimeSeries * sample(uint64_t sampleFreq, uint64_t startTime = 0);Java   public TimeSeries sample(long sampleFreq, long startTime);
C#   public TimeSeries Sample(long frequency, long startTime = 0) . 1point 3 acres
For example, say you are given the following time series.09:00:00 A09:01:00 B09:02:00 C09:03:00 D09:04:00 ESo the original time series starts at 9:00:00. And say you aresampling at 60 seconds. . 1point 3 acres
The result should be09:00:00 A09:01:00 B09:02:00 C09:03:00 D09:04:00 EBut if you are sampling at 30 seconds, the result would look like09:00:00 A09:00:30 A09:01:00 B09:01:30 B09:02:00 C09:02:30 C09:03:00 D09:03:30 D09:04:00 E . Waral dи,
Note that I have time printed out in human readable format just forthe purpose of explaining this problem.
In your code, time will besimply an unsigned 64 bit int (c++) or long (Java, C#)
Assumptions- the input time series will have times that are between 0 and 24 hours- the input times will be an increasing, non repeating, sequence of  numbers. So eg. it could be               1               2               3               4               5               or               1               10               11               12               100. Waral dи,



上一篇:实习offer是不是只能放弃了
下一篇:挂靠cpt的学校需要写上简历吗?
🔗
yup 2022-11-8 09:21:28 来自APP | 只看该作者
全局:
请问楼主后来去了吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表