|
2016(10-12月) 码农类General 硕士 全职@Baidu - 网上海投 - 在线笔试 | Fail | fresh grad应届毕业生
Baidu硅谷 OA
两个题,一共一个小时
1. C++一些基本问题, 用一句话解释专业名词比如polymorphism
2. Coding题
. Waral 鍗氬鏈夋洿澶氭枃绔,
Implement a Calendar class which supports two operations:
1. Schedule events
2. Find time windows which are overbooked and find the associated
conflicted events.
Please implement Schedule and FindConflictedTimeWindows. The return
value of FindConflictedTimeWindows should be a list of
ConflictedTimeWindow objects ordered by their start_time from earliest. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
to latest. Please be aware that each ConflictedTimeWindow should contain
ALL the conflicted events within the associated time period.
. visit 1point3acres.com for more.
Calendar calendar = Calendar()
calendar.Schedule(new Event(4, "2014-01-02 10:00", "2014-01-02 11:00")). From 1point 3acres bbs
calendar.Schedule(new Event(5, "2014-01-02 09:30", "2014-01-02 11:30"))
calendar.Schedule(new Event(6, "2014-01-02 08:30", "2014-01-02 12:30"))
calendar.FindConflictedTimeWindows()
// should return something like the following
// [ConflictedTimeWindow("2014-01-02 09:30", "2014-01-02 10:00", { 5, 6 }),. 1point3acres.com/bbs
// ConflictedTimeWindow("2014-01-02 10:00", "2014-01-02 11:00", { 4, 5, 6 }),
// ConflictedTimeWindow("2014-01-02 11:00", "2014-01-02 11:30", { 5, 6 }),
~~~~
|
评分
-
1
查看全部评分
-
|