Skip to content

Commit d3e9bff

Browse files
edit 417
1 parent a4d5c3e commit d3e9bff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Your ideas/fixes/algorithms are more than welcome!
184184
|420|[Strong Password Checker](https://leetcode.com/problems/strong-password-checker/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_420.java)| ? | ? | Hard|
185185
|419|[Battleships in a Board](https://leetcode.com/problems/battleships-in-a-board/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_419.java) | O(m*n) |O(1) | Medium| DFS
186186
|418|[Sentence Screen Fitting](https://leetcode.com/problems/sentence-screen-fitting/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_418.java) | O(n) |O(1) | Medium|
187-
|417|[Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/)|[Solution](../master/src/main/java/com/fishercoder/solutions/PacificAtlanticWaterFlow.java) | O(m*n*Max(m,n)) |O(m*n) | Medium| DFS
187+
|417|[Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_417.java) | O(m*n*Max(m,n)) |O(m*n) | Medium| DFS
188188
|416|[Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_416.java)| O(m*n)|O(m*n) | Medium | DP
189189
|415|[Add Strings](https://leetcode.com/problems/add-strings/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_415.java)| O(n)|O(1) | Easy|
190190
|414|[Third Maximum Number](https://leetcode.com/problems/third-maximum-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_414.java)| O(n)|O(1) | Easy|

src/main/java/com/fishercoder/solutions/PacificAtlanticWaterFlow.java renamed to src/main/java/com/fishercoder/solutions/_417.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
[[0, 4], [1, 3], [1, 4], [2, 2], [3, 0], [3, 1], [4, 0]] (positions with parentheses in above matrix).*/
1818

19-
public class PacificAtlanticWaterFlow {
19+
public class _417 {
2020
//looked at this post: https://discuss.leetcode.com/topic/62379/java-bfs-dfs-from-ocean
2121

2222
/**One typical trick to work on 2d grid problems is to go through the border and put proper ones into a queue if using BFS.*/
@@ -61,7 +61,7 @@ void dfs(int[][] matrix, boolean[][] visited, int height, int x, int y){
6161
}
6262

6363
public static void main(String...args){
64-
PacificAtlanticWaterFlow test = new PacificAtlanticWaterFlow();
64+
_417 test = new _417();
6565
// int[][] matrix = new int[][]{
6666
// {1,2,2,3,5},
6767
// {3,2,3,4,4},

0 commit comments

Comments
 (0)