To the Top
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 | 1017 Views, 18219 Search Bots | 98 Words

Subscribe to Feed Burner | 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:


def hIndex(publications):
# Fill this in.

print hIndex([5, 3, 3, 1, 0])
# 3
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 1017 Views, 18219 Search Bots | 98 Words Subscribe to Feed Burner

Related Articles

  1. Algorithm Interview: String Compression
  2. Daily Interview Problem: Word Ordering in a Different Alphabetical Order
  3. Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
  4. Daily Interview Problem:Create a balanced binary search tree
  5. Daily Interview Problem: Full Binary Tree
  6. Reverse a Directed Graph
  7. Daily Interview Puzzle: Intersection of Linked Lists
  8. Daily Interview Problem: Largest Product of 3 Elements I
  9. Consecutive Ones
  10. Algorithm Interview: Level Order Traversal of Binary Tree

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />