Amex membership reward怎么用最合适# Money - 海外理财
o*s
1 楼
音乐会演出设计题。First come first serve. 一天只有一个演出,任何演出5天之内
不在重复演出。
(1) 设计一个data structure, check by date, insert performance, delete
performance from calendar in O(log n), n is the number of performance.
(2) 找出任何两天之间的performance,d1 num of such performance.
(3)找出任何两天之间的number of perforances.
(4)Given a requested time d which is impossible (i.e. within 5 days of an
already scheduled performance), give an O(log n)-time algorithm to find the
next available day d2 (d2 > d).
不在重复演出。
(1) 设计一个data structure, check by date, insert performance, delete
performance from calendar in O(log n), n is the number of performance.
(2) 找出任何两天之间的performance,d1
(3)找出任何两天之间的number of perforances.
(4)Given a requested time d which is impossible (i.e. within 5 days of an
already scheduled performance), give an O(log n)-time algorithm to find the
next available day d2 (d2 > d).