Skip to content

Commit

Permalink
add note to binary search
Browse files Browse the repository at this point in the history
  • Loading branch information
keineahnung2345 authored Apr 18, 2022
1 parent af3cb91 commit 25c564d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 378. Kth Smallest Element in a Sorted Matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 25c564d

Please sign in to comment.