Skip to content

Commit 824958c

Browse files
[LEET-3285] add 3285
1 parent bde6a61 commit 824958c

File tree

2 files changed

+19
-0
lines changed
  • paginated_contents/algorithms/4th_thousand
  • src/main/java/com/fishercoder/solutions/fourththousand

2 files changed

+19
-0
lines changed

Diff for: paginated_contents/algorithms/4th_thousand/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| # | Title | Solutions | Video | Difficulty | Tag
22
|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|------------|----------------------------------------------------------------------
3+
| 3285 | [Find Indices of Stable Mountains](https://leetcode.com/problems/find-indices-of-stable-mountains/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3285.java) | | Easy |
34
| 3264 | [Final Array State After K Multiplication Operations I](https://leetcode.com/problems/final-array-state-after-k-multiplication-operations-i/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3264.java) | | Easy |
45
| 3263 | [Convert Doubly Linked List to Array I](https://leetcode.com/problems/convert-doubly-linked-list-to-array-i/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3263.java) | | Easy |
56
| 3258 | [Count Substrings That Satisfy K-Constraint I](https://leetcode.com/problems/count-substrings-that-satisfy-k-constraint-i/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3258.java) | | Easy |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.fishercoder.solutions.fourththousand;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class _3285 {
7+
public static class Solution1 {
8+
public List<Integer> stableMountains(int[] height, int threshold) {
9+
List<Integer> ans = new ArrayList<>();
10+
for (int i = 1; i < height.length; i++) {
11+
if (height[i - 1] > threshold) {
12+
ans.add(i);
13+
}
14+
}
15+
return ans;
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)