Skip to content

Commit 72e6a3f

Browse files
refactor 598
1 parent b704d10 commit 72e6a3f

File tree

1 file changed

+9
-7
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@
4141

4242
public class _598 {
4343

44-
public int maxCount(int m, int n, int[][] ops) {
45-
int x = m;
46-
int y = n;
47-
for (int[] op : ops) {
48-
x = Math.min(x, op[0]);
49-
y = Math.min(y, op[1]);
44+
public static class Solution1 {
45+
public int maxCount(int m, int n, int[][] ops) {
46+
int x = m;
47+
int y = n;
48+
for (int[] op : ops) {
49+
x = Math.min(x, op[0]);
50+
y = Math.min(y, op[1]);
51+
}
52+
return x * y;
5053
}
51-
return x * y;
5254
}
5355
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy