S
All challenges
Practice
Home
Blog
Practice
Examples
Feedback
Kth Smallest in Sorted Matrix
00:00
Start
00:00
Sign in
Problem
Hints
3
Solution
History
Hard
Array
Binary Search
Heap
Amazon
Google
Find kth smallest element in n×n matrix where each row and column is sorted.
Examples
Example 1
Input →
[[1,5,9],[10,11,13],[12,13,15]], k=8
Output →
13
Example 2
Input →
[[-5]], k=1
Output →
-5
Example 3
Input →
[[1,2],[1,3]], k=2
Output →
1
JavaScript
Python
Java (Coming soon)
C (Coming soon)
C++ (Coming soon)
Reset
Run
Submit
Cases
Results