File tree 1 file changed +5
-6
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .ArrayList ;
4
4
import java .util .Collections ;
5
5
import java .util .List ;
6
- /**378. Kth Smallest Element in a Sorted Matrix QuestionEditorial Solution My Submissions
7
- Total Accepted: 5
8
- Total Submissions: 7
9
- Difficulty: Medium
6
+ /**378. Kth Smallest Element in a Sorted Matrix
7
+ *
10
8
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.
11
9
12
10
Note that it is the kth smallest element in the sorted order, not the kth distinct element.
21
19
k = 8,
22
20
23
21
return 13.
24
- Note:
22
+
23
+ Note:
25
24
You may assume k is always valid, 1 ≤ k ≤ n2.*/
26
- public class KthSmallestElementInASortedMatrix {
25
+ public class _378 {
27
26
//brute force made it AC'ed, extreme test case needed for OJ
28
27
public int kthSmallest (int [][] matrix , int k ) {
29
28
List <Integer > list = new ArrayList <Integer >();
You can’t perform that action at this time.
0 commit comments