Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ffe904

Browse files
refactor 598
1 parent7631eae commit8ffe904

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Your ideas/fixes/algorithms are more than welcome!
7979
|604|[Design Compressed String Iterator](https://leetcode.com/problems/design-compressed-string-iterator/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_604.java) | O(n) |O(n) | Easy |Design, String
8080
|600|[Non-negative Integers without Consecutive Ones](https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_600.java) | O(log2(max_int) = 32) | O(log2(max_int) = 32) | Hard | Bit Manipulation, DP
8181
|599|[Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_599.java) | O(max(m,n))|O(max(m,n)) | Easy | HashMap
82-
|598|[Range Addition II](https://leetcode.com/problems/range-addition-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_598.java)| O(n) (n is the number of operations)|O(1)| Easy|
82+
|598|[Range Addition II](https://leetcode.com/problems/range-addition-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_598.java)| O(x) (x is the number of operations)|O(1)| Easy|
8383
|594|[Longest Harmonious Subsequence](https://leetcode.com/problems/longest-harmonious-subsequence/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_594.java) | O(n) |O(n) | Easy | Array, HashMap
8484
|593|[Valid Square](https://leetcode.com/problems/valid-square/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_593.java) | O(1) |O(1) | Medium | Math
8585
|592|[Fraction Addition and Subtraction](https://leetcode.com/problems/fraction-addition-and-subtraction/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_592.java) | O(nlogx) |O(n) | Medium | Math

‎src/main/java/com/fishercoder/solutions/_598.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838
The range of a is [1,m], and the range of b is [1,n].
3939
The range of operations size won't exceed 10,000.
4040
*/
41+
4142
publicclass_598 {
43+
4244
publicintmaxCount(intm,intn,int[][]ops) {
43-
if (ops ==null ||ops.length ==0) {
44-
returnm *n;
45-
}
4645
intx =m;
4746
inty =n;
4847
for (int[]op :ops) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp