Day 10: Coding Challenge
Problem - 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.
Solutions - First, we will sort the array in decreasing order then we will check the last position in which citations[i]>=i+1 and return the index.
Time complexity : O(NLogN)
Space complexity : O(1)
#Codingchallenge #problemsolvingskills #problemsolving #codeforgood #60daysofchallenge #60dayscode #consistency #dsaforproblemsolving