File: root - text - article - 2020 - 01 - h-index.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 1347 Views, 22697 Search Bots | 98 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 1347 Views, 22697 Search Bots | 98 Words
| Browse | Archive
Hi, here's your problem today. This problem was recently asked by Amazon:
The h-index is a metric that attempts to measure the productivity and citation impact of the publication of a scholar. The definition of the h-index is if a scholar has at least h of their papers cited h times.
Given a list of publications of the number of citations a scholar has, find their h-index.
Example:
Input: [3, 5, 0, 1, 3]
Output: 3
Explanation:
There are 3 publications with 3 or more citations, hence the h-index is 3.
Here's a starting point:
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 1347 Views, 22697 Search Bots | 98 Words The h-index is a metric that attempts to measure the productivity and citation impact of the publication of a scholar. The definition of the h-index is if a scholar has at least h of their papers cited h times.
Given a list of publications of the number of citations a scholar has, find their h-index.
Example:
Input: [3, 5, 0, 1, 3]
Output: 3
Explanation:
There are 3 publications with 3 or more citations, hence the h-index is 3.
Here's a starting point:
def hIndex(publications):
# Fill this in.
print hIndex([5, 3, 3, 1, 0])
# 3
Related Articles
- YES!!
- Daily Interview Problem: Find the Number of Islands
- [Daily Problem] Move Zeros
- How to Play WAV music under DOS?
- Daily Interview Problem: Largest BST in a Binary Tree
- Algorithm Interview: Determine If Linked List is Palindrome
- Daily Interview Problem: Reconstrunct Binary Tree from Preorder and Inorder Traversals
- Floor and Ceiling of a Binary Search Tree
- Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
- Daily Interview Question: Longest Sequence with Two Unique Numbers
©2006~2024 SteakOverCooked - 0.00742 Seconds(s) - 2680.909 KB/s - 30 Online Memory: 494.22 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !