Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Kth Smallest Element In A Matrix

Difficulty: Medium

Acceptance: 70.00%

Points: 30.00

You are given an n × n matrix matrix where each row and each column is sorted in ascending order. Given an integer k, return the kth smallest element in the matrix. The kth smallest element is the element that would appear at position k when all elements of the matrix are arranged in sorted order.

Topics

Companies

Articles

Examples:

N/A

Constraints:
  • 1 = n = 300
  • -10? = matrix[i][j] = 10?
  • 1 = k = n × n
Companies:
Amazon
Topics:
Binary Search
Locked Content
Access Restricted: Please Login to access the code editor and test cases.