From 25c564d1d37abe7cae4033b76005d41833fe1dbd Mon Sep 17 00:00:00 2001 From: keineahnung2345 Date: Mon, 18 Apr 2022 22:18:06 +0800 Subject: [PATCH] add note to binary search --- 378. Kth Smallest Element in a Sorted Matrix.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/378. Kth Smallest Element in a Sorted Matrix.md b/378. Kth Smallest Element in a Sorted Matrix.md index 3c91ffe..c5b5110 100644 --- a/378. Kth Smallest Element in a Sorted Matrix.md +++ b/378. Kth Smallest Element in a Sorted Matrix.md @@ -92,6 +92,8 @@ Runtime: 36 ms, faster than 94.39% of C++ online submissions for Kth Smallest El Memory Usage: 11.1 MB, less than 100.00% of C++ online submissions for Kth Smallest Element in a Sorted Matrix. +Guess a `mid` and then find out it's `count` th smallest number, we then decide to search left or right depending on the comparing result of `count` and `k`. + ```cpp class Solution { public: