Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bf90263

Browse files
Revert "Create _881.java (fishercoder1534#147)"
This reverts commit f104be6.
1 parent f104be6 commit bf90263

File tree

3 files changed

+1
-46
lines changed

3 files changed

+1
-46
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ _If you like this project, please leave me a star._ ★
10341034
| 319 |[Bulb Switcher](https://leetcode.com/problems/bulb-switcher/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_319.java) | |Medium| Brainteaser
10351035
| 318 |[Maximum Product of Word Lengths](https://leetcode.com/problems/maximum-product-of-word-lengths/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_318.java) | |Medium|
10361036
| 317 |[Shortest Distance from All Buildings](https://leetcode.com/problems/shortest-distance-from-all-buildings/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_317.java) | |Hard|
1037-
| 316 |[Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_316.java) | |Medium| Stack, Recursion, Greedy
1037+
| 316 |[Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_316.java) | |Hard| Stack, Recursion, Greedy
10381038
| 315 |[Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_315.java) | |Hard| Tree
10391039
| 314 |[Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_314.java) | |Medium| HashMap, BFS
10401040
| 313 |[Super Ugly Number](https://leetcode.com/problems/super-ugly-number/)| [Solution](../master/src/main/java/com/fishercoder/solutions/_313.java) | |Medium|

src/main/java/com/fishercoder/solutions/1961. Check If String Is a Prefix of Array.java

-21
This file was deleted.

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

-24
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,4 @@ public int numRescueBoats(int[] people, int limit) {
5757
return boats;
5858
}
5959
}
60-
61-
public static class Solution2 {
62-
public int numRescueBoats(int[] people, int limit) {
63-
Arrays.sort(people);
64-
int end = people.length - 1;
65-
int start = 0;
66-
int boatcount = 0;
67-
while (end >= start) {
68-
if (people[end] == limit) {
69-
end--;
70-
boatcount++;
71-
} else if (people[end] + people[start] <= limit) {
72-
start++;
73-
end--;
74-
boatcount++;
75-
} else {
76-
end--;
77-
boatcount++;
78-
}
79-
}
80-
return boatcount;
81-
}
82-
}
83-
8460
}

0 commit comments

Comments
 (0)