randomnetworking
Science Score: 31.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (0.5%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
·
Repository
Basic Info
- Host: GitHub
- Owner: sandy695
- Language: Python
- Default Branch: main
- Size: 1000 Bytes
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 1 year ago
· Last pushed over 1 year ago
Metadata Files
Readme
Citation
README.md
RandomNetworking
Adding practice codes. Passionate about Data center network bringup and automation
Owner
- Login: sandy695
- Kind: user
- Repositories: 1
- Profile: https://github.com/sandy695
Citation (citations.py)
'''
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.
[3,0,6,1,5]
[6,5,4,3,0]
[1,3,1]
[3,1,1]
'''
class Solution:
def hIndex(self, citations):
h = 0
citations.sort(reverse = True)
for i in range(0,len(citations)):
if(i+1 > citations[i]):
break
else:
h +=1
return h
# Time complexity: O(nlogn)
# Space complexity: O(1)
# What algorithm is used ? Sorting, greedy algorithm
# Test cases
s = Solution()
print(s.hIndex([3,0,6,1,5])) # 3
print(s.hIndex([1,3,1])) # 1
print(s.hIndex([3,0,6,1,5])) # 3
GitHub Events
Total
- Push event: 2
- Create event: 2
Last Year
- Push event: 2
- Create event: 2