> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0378_kth_smallest_element_in_a_sorted_matrix/slt.md).

# 思路1 矩阵二分查找

判断mid在排序中的位置是否 >= k 如果 >= k说明k在mid前面（包括），right=mid 如果 \<k 说明k在mid后面，left=mid+1
