Skip to content

Commit d240c2e

Browse files
correct time complexity for 1237
1 parent 142890a commit d240c2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Your ideas/fixes/algorithms are more than welcome!
2828
| # | Title | Solutions | Time | Space | Video | Difficulty | Tag
2929
|-----|----------------|---------------|---------------|---------------|--------|-------------|-------------
3030
|1252|[Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1252.java) | O(m*n + k) | O(m*n) | |Easy||
31-
|1237|[Find Positive Integer Solution for a Given Equation](https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1237.java) | O(?) | O(?) | |Easy||
31+
|1237|[Find Positive Integer Solution for a Given Equation](https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1237.java) | | | |Easy||
3232
|1207|[Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1207.java) | O(n) | O(1) | |Easy||
3333
|1160|[Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1160.java) | O(n) | O(m) | |Easy||
3434
|1154|[Day of the Year](https://leetcode.com/problems/day-of-the-year/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1154.java) | O(1) | O(1) | |Easy||

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ abstract class CustomFunction {
5151
}
5252

5353
public static class Solution1 {
54-
/**Time: O(1) since it's bound by 1 <= x, y <= 1000
54+
/**Time: O(x+y)
5555
* Space: O(1)*/
5656
public List<List<Integer>> findSolution(CustomFunction customfunction, int z) {
5757
List<List<Integer>> result = new ArrayList<>();

0 commit comments

Comments
 (0)