Calculate H-Index
Given an array of citations (each citation is a non-negative integer) sorted in ascending order, write a function to compute the researcher's h-index.
The h-index is defined as follows:
-"H-index" is a metric used to measure a researcher's productivity and impact in academia. -It is the largest number h such that h of the researcher's N papers have at least h citations each. For example, if there are 5 papers with citations [0, 1, 3, 5, 6], the h-index is 3 because the researcher has 3 papers with at least 3 citations each.
Write a function calculateHIndex that takes in an array of citations and returns the researcher's h-index.
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?