Skip to content

Commit 9709135

Browse files
edit 277
1 parent e6a976a commit 9709135

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Your ideas/fixes/algorithms are more than welcome!
313313
|280|[Wiggle Sort](https://leetcode.com/problems/wiggle-sort/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_280.java)| O(n)|O(1) | Medium|
314314
|279|[Perfect Squares](https://leetcode.com/problems/perfect-squares/)|[Solution](../master/src/main/java/com/fishercoder/solutions/PerfectSquares.java)| O(n)|O(1) | Medium|
315315
|278|[First Bad Version](https://leetcode.com/problems/first-bad-version/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_278.java)| O(logn)|O(1) | Easy| Binary Search
316-
|277|[Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/)|[Solution](../master/src/main/java/com/fishercoder/solutions/FindtheCelebrity.java)| O(n)|O(1) | Medium|
316+
|277|[Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_277.java)| O(n)|O(1) | Medium|
317317
|276|[Paint Fence](https://leetcode.com/problems/paint-fence/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_276.java)| O(n)|O(1) | Easy| DP
318318
|275|[H-Index II](https://leetcode.com/problems/h-index-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_275.java)| O(logn)|O(1) | Medium| Binary Search
319319
|274|[H-Index](https://leetcode.com/problems/h-index/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_274.java)| O(nlogn)|O(1) | Medium|

src/main/java/com/fishercoder/solutions/FindtheCelebrity.java renamed to src/main/java/com/fishercoder/solutions/_277.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
You are given a helper function bool knows(a, b) which tells you whether A knows B. Implement a function int findCelebrity(n), your function should minimize the number of calls to knows.
77
Note: There will be exactly one celebrity if he/she is in the party. Return the celebrity's label if there is a celebrity in the party. If there is no celebrity, return -1.
88
*/
9-
public class FindtheCelebrity {
9+
public class _277 {
1010

1111
public int findCelebrity(int n) {
1212
int candidate = 0;
@@ -24,6 +24,4 @@ public int findCelebrity(int n) {
2424
private boolean knows(int i, int candidate) {
2525
return false;
2626
}
27-
28-
2927
}

0 commit comments

Comments
 (0)