Skip to content

Commit 7864595

Browse files
edit 274
1 parent b96a4f8 commit 7864595

File tree

1 file changed

+4
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+4
-2
lines changed

src/main/java/com/fishercoder/solutions/_274.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
public class _274 {
2121

2222
public int hIndex(int[] citations) {
23-
if(citations == null || citations.length == 0)
23+
if(citations == null || citations.length == 0) {
2424
return 0;
25+
}
2526

2627
Arrays.sort(citations);
2728
for(int i = 0; i < citations.length; i++){
28-
if(citations[i] >= citations.length - i)
29+
if(citations[i] >= citations.length - i) {
2930
return citations.length - i;
31+
}
3032
}
3133
return 0;
3234
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy