归档 2015年9月4日

[LeetCode]H-Index II

题目描述:

Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?

Hint:

Expected runtime complexity is in O(log n) and the input is sorted.

题目大意:

H-Index的延伸:如果引用数组是递增有序的,你应该怎样优化算法?

提示:

期望运行时间复杂度为O ...

继续阅读

昨天

明天

归档