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

Commit2b4307c

Browse files
refactor 1380
1 parentc1aa2f7 commit2b4307c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

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

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,6 @@
33
importjava.util.ArrayList;
44
importjava.util.List;
55

6-
/**
7-
* 1380. Lucky Numbers in a Matrix
8-
*
9-
* Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order.
10-
* A lucky number is an element of the matrix such that it is the minimum element in its row and maximum in its column.
11-
*
12-
* Example 1:
13-
* Input: matrix = [[3,7,8],[9,11,13],[15,16,17]]
14-
* Output: [15]
15-
* Explanation: 15 is the only lucky number since it is the minimum in its row and the maximum in its column
16-
*
17-
* Example 2:
18-
* Input: matrix = [[1,10,4,2],[9,3,8,7],[15,16,17,12]]
19-
* Output: [12]
20-
* Explanation: 12 is the only lucky number since it is the minimum in its row and the maximum in its column.
21-
*
22-
* Example 3:
23-
* Input: matrix = [[7,8],[1,2]]
24-
* Output: [7]
25-
*
26-
* Constraints:
27-
* m == mat.length
28-
* n == mat[i].length
29-
* 1 <= n, m <= 50
30-
* 1 <= matrix[i][j] <= 10^5.
31-
* All elements in the matrix are distinct.
32-
* */
336
publicclass_1380 {
347
publicstaticclassSolution1 {
358
publicList<Integer>luckyNumbers(int[][]matrix) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp