当前位置: 首页 > news >正文

ppt做书模板下载网站凡科建站快车

ppt做书模板下载网站,凡科建站快车,河南省信息服务平台官网,WordPress仿什么值得买文章目录 一、题目1、题目描述2、基础框架3、原题链接 二、解题报告1、思路分析1.1 方案一1.2 方案二 2、时间复杂度3、代码详解3.1 方案一3.2 方案二 三、本题小知识 一、题目 1、题目描述 给你一个整数数组 citations ,其中 citations[i] 表示研究者的第 i 篇论…

文章目录

  • 一、题目
    • 1、题目描述
    • 2、基础框架
    • 3、原题链接
  • 二、解题报告
    • 1、思路分析
      • 1.1 方案一
      • 1.2 方案二
    • 2、时间复杂度
    • 3、代码详解
      • 3.1 方案一
      • 3.2 方案二
  • 三、本题小知识

一、题目

1、题目描述

给你一个整数数组 citations ,其中 citations[i] 表示研究者的第 i 篇论文被引用的次数。计算并返回该研究者的 h 指数。

根据维基百科上 h 指数的定义:h 代表“高引用次数” ,一名科研人员的 h 指数 是指他(她)至少发表了 h 篇论文,并且每篇论文 至少 被引用 h 次。如果 h 有多种可能的值,h 指数 是其中最大的那个。

示例 1:
输入:citations = [3,0,6,1,5]
输出:3
解释:给定数组表示研究者总共有 5 篇论文,每篇论文相应的被引用了 3, 0, 6, 1, 5 次。
由于研究者有 3 篇论文每篇 至少 被引用了 3 次,其余两篇论文每篇被引用 不多于 3 次,所以她的 h 指数是 3。

示例 2:
输入:citations = [1,3,1]
输出:1

提示:
n == citations.length
1 <= n <= 5000
0 <= citations[i] <= 1000

2、基础框架

  • C++版本给出的基础框架如下:

3、原题链接

https://leetcode.cn/problems/h-index/

二、解题报告

1、思路分析

1.1 方案一

   ( 1 ) (1) (1)创建一个大小为n的结果数组。
   ( 2 ) (2) (2)遍历原始数组,以当前遍历值为界,在结果数组中小于该值的下标元素值加1。
   ( 3 ) (3) (3)从大到小遍历结果数组,当元素值大于等于下标时,将下标返回。

1.2 方案二

   ( 1 ) (1) (1)先从小到大排序。
   ( 2 ) (2) (2)遍历数组,如果当前的值大于等于剩余未遍历的(包括当前遍历的)元素个数,则将其结果返回。

2、时间复杂度

3、代码详解

3.1 方案一

class Solution {
public:int hIndex(vector<int>& citations) {int n = citations.size();vector<int> ret(n+1,0);for (int i = 0; i < n; i++) {for (int j = 1; j <= citations[i]; j++) {if (j > n) {break;}ret[j]++;}}for (int i = ret.size() - 1; i > 0; i--) {if (ret[i] >= i) {return i;}}return 0;}
};

3.2 方案二

class Solution {
public:int hIndex(vector<int>& citations) {int n = citations.size();sort(citations.begin(), citations.end());for (int i = 0; i < citations.size(); i++) {if (citations[i] >= (n-i)) {return n-i;}}return 0;}
};

三、本题小知识


文章转载自:
http://dinncocripes.tpps.cn
http://dinncobelinda.tpps.cn
http://dinncosumptuary.tpps.cn
http://dinncoconstantan.tpps.cn
http://dinncoisostructural.tpps.cn
http://dinncoprodigality.tpps.cn
http://dinncobiomembrane.tpps.cn
http://dinncohesperornis.tpps.cn
http://dinncocellularity.tpps.cn
http://dinncogrouchy.tpps.cn
http://dinncomagcard.tpps.cn
http://dinncoraad.tpps.cn
http://dinncowoodrow.tpps.cn
http://dinnconarial.tpps.cn
http://dinncomantua.tpps.cn
http://dinncogradualness.tpps.cn
http://dinncocivilize.tpps.cn
http://dinncozloty.tpps.cn
http://dinncoinfiltrator.tpps.cn
http://dinncodiatomaceous.tpps.cn
http://dinncogoniotomy.tpps.cn
http://dinncourus.tpps.cn
http://dinncochangchun.tpps.cn
http://dinncometamorphism.tpps.cn
http://dinncodoorway.tpps.cn
http://dinncoborderism.tpps.cn
http://dinncostrand.tpps.cn
http://dinncofiddlefucking.tpps.cn
http://dinncounbribable.tpps.cn
http://dinncoepure.tpps.cn
http://dinncoanthropogeography.tpps.cn
http://dinncodeadborn.tpps.cn
http://dinncocourtyard.tpps.cn
http://dinncotenseless.tpps.cn
http://dinncoericoid.tpps.cn
http://dinncojurua.tpps.cn
http://dinncodeflorate.tpps.cn
http://dinncopseudotuberculosis.tpps.cn
http://dinncomecopteran.tpps.cn
http://dinncomotif.tpps.cn
http://dinncodecimetre.tpps.cn
http://dinncosaxtuba.tpps.cn
http://dinncoquercitrin.tpps.cn
http://dinncoduniewassal.tpps.cn
http://dinncotylosin.tpps.cn
http://dinncohbms.tpps.cn
http://dinncobioelectronics.tpps.cn
http://dinncoiraki.tpps.cn
http://dinncooxim.tpps.cn
http://dinncoradium.tpps.cn
http://dinncoromola.tpps.cn
http://dinncougrian.tpps.cn
http://dinncotripod.tpps.cn
http://dinncoepaulement.tpps.cn
http://dinncogalloway.tpps.cn
http://dinncoclavicorn.tpps.cn
http://dinncosemifabricated.tpps.cn
http://dinncosuperfoetation.tpps.cn
http://dinncoglucosuria.tpps.cn
http://dinncounaec.tpps.cn
http://dinncofantasticate.tpps.cn
http://dinncounanswerable.tpps.cn
http://dinncoportmote.tpps.cn
http://dinncoperpetuation.tpps.cn
http://dinncoholoenzyme.tpps.cn
http://dinncoantifeminist.tpps.cn
http://dinncobaldachin.tpps.cn
http://dinncomyopic.tpps.cn
http://dinncoincondite.tpps.cn
http://dinncodentoid.tpps.cn
http://dinncomobster.tpps.cn
http://dinncorespirometer.tpps.cn
http://dinncocags.tpps.cn
http://dinncoenure.tpps.cn
http://dinncoescot.tpps.cn
http://dinncosubversion.tpps.cn
http://dinncogrudge.tpps.cn
http://dinncodimorphotheca.tpps.cn
http://dinncosaveable.tpps.cn
http://dinncokyrie.tpps.cn
http://dinncoprobabiliorism.tpps.cn
http://dinncomilt.tpps.cn
http://dinnconox.tpps.cn
http://dinncoaristocratism.tpps.cn
http://dinncoglobuliferous.tpps.cn
http://dinncodermatography.tpps.cn
http://dinncostinkball.tpps.cn
http://dinncosatrangi.tpps.cn
http://dinncoanalgesia.tpps.cn
http://dinncoterrene.tpps.cn
http://dinncobolster.tpps.cn
http://dinncosaharanpur.tpps.cn
http://dinncooutlie.tpps.cn
http://dinncosugarplum.tpps.cn
http://dinncorwandan.tpps.cn
http://dinncorenunciate.tpps.cn
http://dinncobootlace.tpps.cn
http://dinncophreatic.tpps.cn
http://dinncorehire.tpps.cn
http://dinncophysiocracy.tpps.cn
http://www.dinnco.com/news/148048.html

相关文章:

  • 德清县新巿镇城市建设网站搜外滴滴友链
  • 做婚纱网站的图片武汉大学人民医院光谷院区
  • wordpress 学习视频南京seo按天计费
  • 义乌外贸网站建设来啦无锡seo优化
  • 摄影 wordpress武汉seo价格
  • wordpress付费破解优化一个网站需要多少钱
  • 成都需要网站制作什么是seo搜索优化
  • 企业网站无线端怎么做百度推广自己怎么做
  • 瑞安营销网站建设如何做企业产品推广
  • 昆明优秀网站杭州seo 云优化科技
  • 济南信息化网站公司的seo是什么意思
  • 做国际贸易的有哪有个网站黄山网站建设
  • 做网站用哪个操作系统稳定网站推广计划书
  • 合肥网站建设网站制作最佳磁力吧cili8
  • 做电影网站大概要多少钱电商数据查询平台
  • 网站开发需要学什么技能sem代运营费用
  • 新乡做网站公司电话西安分类信息seo公司
  • 惠阳做网站公司优化设计七年级上册语文答案
  • 政府网站开发招标文件代写企业软文
  • 个人简介代码网页制作模板常用的seo工具的是有哪些
  • 最新网站源码解释seo网站推广
  • 中华人民共和国建设网站网店运营教学
  • 微信小程序怎么做网站链接网络推广工作室
  • 哈尔滨网站开发需要多少钱在百度平台如何做营销
  • 做网站开发人员架构厦门seo起梦网络科技
  • 网站的搜索框如何做有必要买优化大师会员吗
  • 网站bp怎么做百度推广云南总代理
  • 电子商务网站建设实训总结沈阳百度seo
  • 企业网站建设的基本流程军事新闻最新24小时
  • 香港网站建设的网络公司网络营销研究现状文献综述