Skip to content

Commit 359ee65

Browse files
authored
Update kth-smallest-element-in-a-sorted-matrix.cpp
1 parent 3cb7070 commit 359ee65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/kth-smallest-element-in-a-sorted-matrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Solution {
1111
auto push = [&matrix, &q](int i, int j) {
1212
if (matrix.size() > matrix[0].size()) {
1313
if (i < matrix[0].size() && j < matrix.size()) {
14-
q.emplace(matrix[j][i], make_pair(j, i));
14+
q.emplace(matrix[j][i], make_pair(i, j));
1515
}
1616
} else {
1717
if (i < matrix.size() && j < matrix[0].size()) {

0 commit comments

Comments
 (0)