<reponame>ansabgillani/binarysearchcomproblems<gh_stars>1-10
class Solution:
    def solve(self, matrix, k):
        return sorted(num for row in matrix for num in row)[k]

class Solution:
    def solve(self, matrix, k):
        return sorted(num for row in matrix for num in row)[k]