【Leetcode】H-Index
来源:互联网 发布:windows如何隐藏分区 编辑:程序博客网 时间:2024/05/22 04:31
题目链接:https://leetcode.com/problems/h-index/
题目:
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.
According to the definition of h-index on Wikipedia: "A scientist has index h if h of his/her N papers have at least h citations each, and the other N − h papers have no more than h citations each."
For example, given citations = [3, 0, 6, 1, 5]
, which means the researcher has 5
papers in total and each of them had received 3, 0, 6, 1, 5
citations respectively. Since the researcher has 3
papers with at least 3
citations each and the remaining two with no more than 3
citations each, his h-index is 3
.
Note: If there are several possible values for h
, the maximum one is taken as the h-index.
Hint:
- An easy approach is to sort the array first.
- What are the possible values of h-index?
- A faster approach is to use extra space.
- Leetcode 274 : H-index
- leetcode H-Index
- [leetcode][sort] H-Index
- 【leetCode】H-Index
- Leetcode: H-Index
- Leetcode: H-Index II
- leetcode 274: H-Index
- [leetcode] 274.H-Index
- leetcode 之 H-index
- LeetCode: H-Index
- leetcode H-index 2
- Leetcode: H-Index
- Leetcode: H-Index II
- leetcode: H-Index
- [LeetCode 274] H-index
- [LeetCode]H-Index
- [LeetCode]H-Index II
- H-Index -- leetcode
- 为什么MVC不是一种设计模式
- Opencv3.0-python的那些事儿:(三)、Opencv的图像处理中的几何变换
- win7安装plsql连接oracle11g 11.2.0.4 64位数据库的简单方式
- 数据输出——print方法
- 排序:希尔排序
- 【Leetcode】H-Index
- 第十二周上机实践项目1(3):实现复数类中的运算符重载
- 我的第一篇博客(2016年6月3日晚)
- Android 适配器-mouseadapter
- 快速排序算法
- Linux零散知识点笔记
- 《图解TCP/IP》读书笔记(6)
- SecureCRT删除键、方向键乱码处理
- 借助HBuilder快速开发APP入门