【LeetCode 面试经典150题】274. H-Index H指数

本文介绍如何通过编程解决计算研究人员H-指数的问题,利用排序和循环算法确定满足h论文被引用至少h次的论文数量。给定一个整数数组表示论文引用次数,返回研究人员的H-指数值。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

274. H-Index

题目大意

Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith paper, return the researcher’s h-index.

According to the definition of h-index on Wikipedia: The h-index is defined as the maximum value of h such that the given researcher has published at least h papers that have each been cited at least h times.

中文释义

给定一个整数数组 citations,其中 citations[i] 是研究人员发表的第 i 篇论文收到的引用次数,返回研究人员的 h 指数。

根据维基百科上 h 指数的定义:h 指数定义为满足以下条件的最大的 h:研究人员至少发表了 h 篇论文,每篇论文被引用了至少 h 次。

Example

Example 1:

  • Input: citations = [3,0,6,1,5]
  • Output: 3
  • Explanation: [3,0,6,1,5] 表示研究人员总共发表了 5 篇论文,每篇分别收到了 3, 0, 6, 1, 5 次引用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值